Skip to content

Commit 7e96858

Browse files
authored
Merge pull request #792 from ThePortlandGroup/nv_stage
Pull 2019-08-29T14-52 Recent NVIDIA Changes
2 parents 4053b48 + b166f13 commit 7e96858

File tree

5 files changed

+32
-18
lines changed

5 files changed

+32
-18
lines changed

runtime/flang/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,17 @@ add_flang_library(flang_shared
495495
${SHARED_SOURCES}
496496
)
497497
set_property(TARGET flang_shared PROPERTY OUTPUT_NAME flang)
498+
499+
#
500+
# Seralize the building of flang_shared and flang_static to eliminate
501+
# conflicts with the same module files from the shared and static builds
502+
# being created/recreated in the common directory
503+
# ${CMAKE_Fortran_MODULE_DIRECTORY}.
504+
#
505+
# Note: building of each library is still parallelized.
506+
#
507+
add_dependencies(flang_shared flang_static)
508+
498509
target_link_libraries(flang_shared ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib/libflangrti.so)
499510
# Resolve symbols against libm and librt
500511
target_link_libraries(flang_shared m rt)

runtime/libpgmath/lib/common/sincos/fd_sincos_scalar.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/*
3-
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3+
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -179,9 +179,6 @@ __attribute__((noinline)) FCN_NAME(double const x)
179179

180180

181181
#if defined(SINCOS)
182-
#if defined(CMPLX)
183-
return CMPLX(rs, rc);
184-
#else
185182
struct {
186183
union {
187184
double _Complex c;
@@ -192,7 +189,6 @@ __attribute__((noinline)) FCN_NAME(double const x)
192189
ret_cmplx.d[1] = rc;
193190

194191
return ret_cmplx.c;
195-
#endif
196192
#else
197193
S(return rs;)
198194
C(return rc;)

tools/flang1/flang1exe/func.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6235,6 +6235,19 @@ inline_reduction_f90(int ast, int dest, int lc, LOGICAL *doremove)
62356235
astsubscrtmp = dest;
62366236
} else
62376237
astsubscrtmp = asttmp;
6238+
if (A_OPTYPEG(ast) == I_MAXLOC || A_OPTYPEG(ast) == I_MINLOC ||
6239+
A_OPTYPEG(ast) == I_MAXVAL || A_OPTYPEG(ast) == I_MINVAL) {
6240+
/* if the expression being reduced is nontrivial, assign to a temp */
6241+
if (A_TYPEG(ast2) == A_SUBSCR || A_TYPEG(ast2) == A_ID) {
6242+
} else {
6243+
/* create a temporary scalar */
6244+
int temprhs = sym_get_scalar(SYMNAME(sptr), "l", dtyperes);
6245+
/* assign the RHS to temprhs */
6246+
int std = mk_assn_stmt(mk_id(temprhs), ast2, dtyperes);
6247+
add_stmt_before(std, stdnext);
6248+
ast2 = mk_id(temprhs);
6249+
}
6250+
}
62386251
}
62396252
dtsclr = DDTG(dtypetmp);
62406253
switch (A_OPTYPEG(ast)) {

tools/flang1/flang1exe/semant.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,19 +2748,11 @@ semant1(int rednum, SST *top)
27482748
* <end stmt> ::= <END stmt> |
27492749
*/
27502750
case END_STMT1:
2751-
if (sem.interface && !gbl.rutype) {
2752-
error(310, 3, gbl.lineno, "Missing ENDINTERFACE statement", CNULL);
2753-
} else if (sem.interface) {
2754-
if (flg.standard) {
2755-
error(155, 3, gbl.lineno,
2756-
"END statement for interface procedure must be END",
2757-
name_of_rutype(gbl.rutype));
2758-
} else {
2759-
error(155, 2, gbl.lineno,
2760-
"END statement for internal procedure should be END",
2761-
name_of_rutype(gbl.rutype));
2762-
}
2763-
}
2751+
if (sem.interface && !gbl.rutype)
2752+
error(310, 3, gbl.lineno, "Missing ENDINTERFACE statement", CNULL);
2753+
else if (sem.which_pass)
2754+
fix_class_args(gbl.currsub);
2755+
27642756
dummy_program();
27652757
if (IN_MODULE_SPEC && gbl.internal == 0)
27662758
goto end_of_module;

tools/flang2/docs/xflag.n

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,8 @@ when the loop-end condition is a known 'distance' away from the initial value
11861186
of the pointer
11871187
.XB 0x400
11881188
Disable scalar replacement for invariant array references within loops.
1189+
.XB 0x800
1190+
reserved.
11891191

11901192
.XF "30-39"
11911193
Reserved for low-level vectorizer.

0 commit comments

Comments
 (0)