| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
The compiler may produce unexpected error messages/crashes when declare
target variables were used. Patch fixes problems with the declarations
marked as declare target to or link.
llvm-svn: 339805
|
|
|
|
|
|
|
| |
The attribute marked as inheritable since OpenMP 5.0 supports it +
additional fixes to support new functionality.
llvm-svn: 339704
|
|
|
|
|
|
|
| |
The number of loops associated with the OpenMP loop constructs should
not be considered as the number loops to collapse.
llvm-svn: 339603
|
|
|
|
|
|
| |
This reverts commit r339568 because of the problems with the buildbots.
llvm-svn: 339574
|
|
|
|
|
|
|
| |
The number of loops associated with the OpenMP loop constructs should
not be considered as the number loops to collapse.
llvm-svn: 339568
|
|
|
|
|
|
|
|
|
| |
declare target.
According to OpenMP 5.0, variables captured in lambdas in declare target
regions must be considered as implicitly declare target.
llvm-svn: 339152
|
|
|
|
|
|
|
|
|
|
|
|
| |
initialization code
Encoding offload target triples onto comdat group key for offload initialization
code guarantees that it will be executed once per each unique combination of
offload targets.
Differential Revision: https://reviews.llvm.org/D50218
llvm-svn: 338916
|
|
|
|
|
|
|
|
| |
offload targets.
Changed the linkage of omp_offloading.img_start.<triple> and omp_offloading.img_end.<triple> symbols from external to external weak to allow dropping of some targets during linking.
llvm-svn: 338413
|
|
|
|
|
|
| |
No need to change the linkage, we can avoid the problem using special variable. That points to the original variable and, thus, prevent some of the optimizations that might break the compilation.
llvm-svn: 338399
|
|
|
|
|
|
|
| |
Do not mark static variable as internal on the device as they must be
visible from the host to be mapped correctly.
llvm-svn: 338139
|
|
|
|
|
|
|
| |
If the user requested compilation for OpenMP with the offloading
support, force the version of the OpenMP standard to 4.5 by default.
llvm-svn: 338032
|
|
|
|
|
|
|
|
| |
The first argument for the parallel outlined functions, called as
serialized parallel regions, should be a pointer to the global thread id
that always is 0.
llvm-svn: 337957
|
|
|
|
|
|
|
|
|
|
| |
the children.
Special internal helper expressions/statements for the OpenMP directives
should not be exposed as children, only the main substatement must be
represented as the child.
llvm-svn: 337941
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r336467: libatomic is not available on all Linux
systems and this commit completely breaks OpenMP on them, even if there
are no atomic operations or all of them can be lowered to hardware
instructions.
See http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180716/234816.html
for post-commit discussion.
llvm-svn: 337722
|
|
|
|
|
|
|
|
|
|
|
| |
libomptarget. The changes in the interface are the following:
device IDs are now 64-bit integers (as opposed to 32-bit)
map flags are 64-bit long (used to be 32-bit)
mappings for partially mapped structs are now calculated at compile time and members of partially mapped structs are flagged using the MEMBER_OF field
Support for is_device_ptr on struct members was dropped - this functionality is not supported by the OpenMP standard and its implementation is technically infeasible (however, use_device_ptr on struct members works as a non-standard extension of the compiler)
llvm-svn: 337468
|
|
|
|
|
|
|
|
| |
If the declare target link entries are created but not used, the
compiler will produce an error message. Patch improves handling of such
situations + improves checks for possibly lost declare target variables.
llvm-svn: 337207
|
|
|
|
|
|
| |
Fixed spelling of the offloading error messages.
llvm-svn: 337196
|
|
|
|
|
|
|
| |
Sometimes we can try to globalize non-variable declarations, which may
lead to compiler crash.
llvm-svn: 337191
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: In the SPMD case, we need to initialize the data sharing and globalization infrastructure. This covers the case when an SPMD region calls a function in a different compilation unit.
Reviewers: ABataev, carlo.bertolli, caomhin
Reviewed By: ABataev
Subscribers: Hahnfeld, jholewinski, guansong, cfe-commits
Differential Revision: https://reviews.llvm.org/D49188
llvm-svn: 337015
|
|
|
|
|
|
|
|
|
|
| |
See https://reviews.llvm.org/D47106 for details.
Reviewed By: probinson
Differential Revision: https://reviews.llvm.org/D47172
llvm-svn: 336844
|
|
|
|
|
|
|
|
|
| |
When the parsing of the functions happens inside of the declare target
region, we may erroneously mark local variables as declare target
thought they are not. This attribute can be applied only to global
variables.
llvm-svn: 336592
|
|
|
|
|
|
|
|
|
|
| |
In generic data-sharing mode we are allowed to not globalize local
variables that escape their declaration context iff they are declared
inside of the parallel region. We can do this because L2 parallel
regions are executed sequentially and, thus, we do not need to put
shared local variables in the global memory.
llvm-svn: 336567
|
|
|
|
|
|
|
| |
On Linux atomic constructs in OpenMP require libatomic library. Patch
links libatomic when -fopenmp is used.
llvm-svn: 336467
|
|
|
|
|
|
|
|
| |
For some of the clauses the closing location erroneously points to the
beginning of the next clause rather than on the location of the closing
bracket of the clause.
llvm-svn: 336460
|
|
|
|
|
|
|
|
|
|
|
| |
A reduction for an incomplete array type used to produce an assert
fail during codegen. Now it produces a diagnostic.
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D48735
llvm-svn: 335911
|
|
|
|
|
|
| |
Sorry, forgot to add commit log attributes again.
llvm-svn: 335910
|
|
|
|
|
|
|
| |
A reduction for an incomplete array type used to produce an assert
fail during codegen. Now it produces a diagnostic.
llvm-svn: 335907
|
|
|
|
|
|
|
|
|
| |
Patch tries to make better analysis of the variables that should be
globalized. From now, instead of all parallel directives it will check
only distribute parallel .. directives and check only for
firstprivte/lastprivate variables if they must be globalized.
llvm-svn: 335632
|
|
|
|
|
|
|
|
|
| |
threadprivate.
Do not delay emission of the address constant variables in OpenMP mode
as they cannot be defined as threadprivate.
llvm-svn: 335483
|
|
|
|
|
|
|
|
| |
If the shuffle is required for the reduced structures/big data type,
current code may cause compiler crash because of the loading of the
aggregate values. Patch fixes this problem.
llvm-svn: 335377
|
|
|
|
|
|
|
|
|
|
| |
parallel region.
If the current construct requires sharing of the local variable in the
inner parallel region, this variable must be globalized to avoid
runtime crash.
llvm-svn: 335285
|
|
|
|
|
|
|
| |
If simple reduction is requested, use the simple reduction instead of
the runtime functions calls.
llvm-svn: 334962
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If orphaned parallel region is found, the next code must be emitted:
```
if(__kmpc_is_spmd_exec_mode() || __kmpc_parallel_level(loc, gtid))
Serialized execution.
else if (IsMasterThread())
Prepare and signal worker.
else
Outined function call.
```
llvm-svn: 333301
|
|
|
|
|
|
|
|
| |
if `-fopenmp-simd` is specified alone, `_OPENMP` macro should not be
defined. If `-fopenmp-simd` is specified along with the `-fopenmp`,
`_OPENMP` macro should be defined with the value `201511`.
llvm-svn: 332852
|
|
|
|
|
|
|
|
|
|
|
| |
functions.
If the combined construct is specified in the declare target function
and the device code is emitted, the compiler crashes because of the
incorrectly chosen captured stmt. We should choose the innermost
captured statement, not the outermost.
llvm-svn: 332477
|
|
|
|
|
|
|
|
| |
If the orphaned directive is executed in SPMD mode, we need to emit the
check for the SPMD mode and run the orphaned parallel directive in
sequential mode.
llvm-svn: 332467
|
|
|
|
|
|
|
|
| |
In generic data-sharing mode we do not need to globalize
variables/parameters of reference/pointer types. They already are placed
in the global memory.
llvm-svn: 332380
|
|
|
|
|
|
|
|
|
| |
distribute simd directives.
Directives `target simd` and `target teams distribute simd` must be
executed in non-SPMD mode.
llvm-svn: 332129
|
|
|
|
|
|
|
|
| |
Added initial support for L2 parallelism in SPMD mode. Note, though,
that the orphaned parallel directives are not currently supported in
SPMD mode.
llvm-svn: 332016
|
|
|
|
|
|
|
| |
It is required to emit unique names for offloading regions ids. Required
to support compilation and linking of several compilation units.
llvm-svn: 331899
|
|
|
|
|
|
|
|
|
|
|
| |
If the global variables are marked as declare target and they need
ctors/dtors, these ctors/dtors are emitted and then invoked by the
offloading runtime library. They are not explicitly used in the emitted
code and thus can be optimized out. Patch marks these functions as used,
so the optimizer cannot remove these function during the optimization
phase.
llvm-svn: 331879
|
|
|
|
|
|
|
| |
The linkage of the global entries must be weak to enable support of
redefinition of the same target regions in multiple compilation units.
llvm-svn: 331768
|
|
|
|
| |
llvm-svn: 331654
|
|
|
|
|
|
| |
Added correct codegen for the critical construct on NVPTX devices.
llvm-svn: 331652
|
|
|
|
|
|
|
| |
Added initial codegen for level 2, 3 etc. parallelism. Currently, all
the second, the third etc. parallel regions will run sequentially.
llvm-svn: 331642
|
|
|
|
|
|
|
|
| |
Reviewed by: ABataev
Differential Revision: https://reviews.llvm.org/D46370
llvm-svn: 331469
|
|
|
|
|
|
| |
Sorry, forgot to add commit log attributes.
llvm-svn: 331468
|
|
|
|
| |
llvm-svn: 331466
|
|
|
|
|
|
|
|
| |
regions.
Added codegen for `simd reduction()` constructs in target directives.
llvm-svn: 331393
|
|
|
|
|
|
|
| |
If the mapped entity is a data member, we erroneously checked the type
of its base rather than the type of the mapped entity itself.
llvm-svn: 331385
|