summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENMP] FIx processing of declare target variables.Alexey Bataev2018-08-152-5/+27
| | | | | | | | 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
* [OPENMP] Fix processing of declare target construct.Alexey Bataev2018-08-141-0/+24
| | | | | | | The attribute marked as inheritable since OpenMP 5.0 supports it + additional fixes to support new functionality. llvm-svn: 339704
* [OPENMP] Fix emission of the loop doacross constructs.Alexey Bataev2018-08-133-37/+100
| | | | | | | The number of loops associated with the OpenMP loop constructs should not be considered as the number loops to collapse. llvm-svn: 339603
* Revert "[OPENMP] Fix emission of the loop doacross constructs."Alexey Bataev2018-08-133-100/+37
| | | | | | This reverts commit r339568 because of the problems with the buildbots. llvm-svn: 339574
* [OPENMP] Fix emission of the loop doacross constructs.Alexey Bataev2018-08-133-37/+100
| | | | | | | The number of loops associated with the OpenMP loop constructs should not be considered as the number loops to collapse. llvm-svn: 339568
* [OPENMP] Mark variables captured in declare target region as implicitlyAlexey Bataev2018-08-072-2/+36
| | | | | | | | | 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
* [OpenMP] Encode offload target triples into comdat key for offload ↵Sergey Dmitriev2018-08-031-0/+49
| | | | | | | | | | | | 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
* [OPENMP] Change linkage of offloading symbols to support droppingAlexey Bataev2018-07-3131-62/+62
| | | | | | | | 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
* [OPENMP] Prevent problems with linking of the static variables.Alexey Bataev2018-07-312-5/+6
| | | | | | 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
* [OPENMP] Static variables on device must be externally visible.Alexey Bataev2018-07-272-3/+6
| | | | | | | 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
* [OPENMP] Force OpenMP 4.5 when compiling for offloading.Alexey Bataev2018-07-261-0/+3
| | | | | | | 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
* [OPENMP] ThreadId in serialized parallel regions is 0.Alexey Bataev2018-07-252-12/+12
| | | | | | | | 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
* [OPENMP] Exclude service expressions/statements from the list ofAlexey Bataev2018-07-251-5/+5
| | | | | | | | | | 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
* Revert "[OPENMP] Fix PR38026: Link -latomic when -fopenmp is used."Jonas Hahnfeld2018-07-231-8/+8
| | | | | | | | | | | | 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
* The patch adds support for the new map interface between clang and ↵Alexey Bataev2018-07-1944-863/+1119
| | | | | | | | | | | 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
* [OPENMP] Fix checks for declare target link entries.Alexey Bataev2018-07-161-3/+4
| | | | | | | | 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
* [OPENMP] Fix syntactic errors in error messages.Alexey Bataev2018-07-161-1/+1
| | | | | | Fixed spelling of the offloading error messages. llvm-svn: 337196
* [OPENMP, NVPTX] Globalize only captured variables.Alexey Bataev2018-07-161-18/+20
| | | | | | | Sometimes we can try to globalize non-variable declarations, which may lead to compiler crash. llvm-svn: 337191
* [OpenMP] Initialize data sharing stack for SPMD caseGheorghe-Teodor Bercea2018-07-137-3/+20
| | | | | | | | | | | | | | 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
* [FileCheck] Add -allow-deprecated-dag-overlap to failing clang testsJoel E. Denny2018-07-1124-536/+536
| | | | | | | | | | See https://reviews.llvm.org/D47106 for details. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47172 llvm-svn: 336844
* [OPENMP] Do not mark local variables as declare target.Alexey Bataev2018-07-091-1/+16
| | | | | | | | | 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
* [OPENMP, NVPTX] Do not globalize local variables in parallel regions.Alexey Bataev2018-07-094-19/+30
| | | | | | | | | | 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
* [OPENMP] Fix PR38026: Link -latomic when -fopenmp is used.Alexey Bataev2018-07-061-8/+8
| | | | | | | On Linux atomic constructs in OpenMP require libatomic library. Patch links libatomic when -fopenmp is used. llvm-svn: 336467
* [OPENMP] Make clauses closing loc point to right bracket.Alexey Bataev2018-07-061-3/+3
| | | | | | | | 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
* [OPENMP] Fix incomplete type check for array reductionsJoel E. Denny2018-06-281-0/+11
| | | | | | | | | | | 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
* Revert r335907: [OPENMP] Fix incomplete type check for array reductionsJoel E. Denny2018-06-281-11/+0
| | | | | | Sorry, forgot to add commit log attributes again. llvm-svn: 335910
* [OPENMP] Fix incomplete type check for array reductionsJoel E. Denny2018-06-281-0/+11
| | | | | | | A reduction for an incomplete array type used to produce an assert fail during codegen. Now it produces a diagnostic. llvm-svn: 335907
* [OPENMP, NVPTX] Reduce the number of the globalized variables.Alexey Bataev2018-06-261-0/+51
| | | | | | | | | 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
* [OPENMP] Do not consider address constant vars as possiblyAlexey Bataev2018-06-251-0/+29
| | | | | | | | | threadprivate. Do not delay emission of the address constant variables in OpenMP mode as they cannot be defined as threadprivate. llvm-svn: 335483
* [OPENMP, NVPTX] Fix reduction of the big data types/structures.Alexey Bataev2018-06-222-56/+56
| | | | | | | | 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
* [OPENMP, NVPTX] Fix globalization of the variables passed to orphanedAlexey Bataev2018-06-211-0/+9
| | | | | | | | | | 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
* [OPENMP, NVPTX] Emit simple reduction if requested.Alexey Bataev2018-06-181-3/+2
| | | | | | | If simple reduction is requested, use the simple reduction instead of the runtime functions calls. llvm-svn: 334962
* [OPENMP, NVPTX] Fixed codegen for orphaned parallel region.Alexey Bataev2018-05-251-9/+4
| | | | | | | | | | | | | | 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
* [OPENMP-SIMD] Fix PR37536: Fix definition of _OPENMP macro.Alexey Bataev2018-05-212-11/+11
| | | | | | | | 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
* [OPENMP] DO not crash on combined constructs in declare targetAlexey Bataev2018-05-161-1/+1
| | | | | | | | | | | 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
* [OPENMP, NVPTX] Add check for SPMD mode in orphaned parallel directives.Alexey Bataev2018-05-161-0/+10
| | | | | | | | 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
* [OPENMP, NVPTX] Do not globalize variables with reference/pointer types.Alexey Bataev2018-05-155-42/+23
| | | | | | | | 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
* [OPENMP, NVPTX] Do not use SPMD mode for target simd and target teamsAlexey Bataev2018-05-112-38/+30
| | | | | | | | | distribute simd directives. Directives `target simd` and `target teams distribute simd` must be executed in non-SPMD mode. llvm-svn: 332129
* [OPENMP, NVPTX] Initial support for L2 parallelism in SPMD mode.Alexey Bataev2018-05-104-12/+40
| | | | | | | | 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
* [OPENMP] Generate unique names for offloading regions id.Alexey Bataev2018-05-092-1/+150
| | | | | | | It is required to emit unique names for offloading regions ids. Required to support compilation and linking of several compilation units. llvm-svn: 331899
* [OPENMP] Mark global tors/dtors as used.Alexey Bataev2018-05-091-0/+4
| | | | | | | | | | | 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
* [OPENMP, NVPTX] Fix linkage of the global entries.Alexey Bataev2018-05-0850-372/+372
| | | | | | | 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
* [OPENMP, NVPTX] Small test fix, NFC.Alexey Bataev2018-05-071-2/+2
| | | | llvm-svn: 331654
* [OPENMP, NVPTX] Codegen for critical construct.Alexey Bataev2018-05-071-2/+24
| | | | | | Added correct codegen for the critical construct on NVPTX devices. llvm-svn: 331652
* [OPENMP, NVPTX] Added support for L2 parallelism.Alexey Bataev2018-05-072-68/+75
| | | | | | | Added initial codegen for level 2, 3 etc. parallelism. Currently, all the second, the third etc. parallel regions will run sequentially. llvm-svn: 331642
* [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAGJoel E. Denny2018-05-038-72/+72
| | | | | | | | Reviewed by: ABataev Differential Revision: https://reviews.llvm.org/D46370 llvm-svn: 331469
* Revert r331466: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG"Joel E. Denny2018-05-038-72/+72
| | | | | | Sorry, forgot to add commit log attributes. llvm-svn: 331468
* [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAGJoel E. Denny2018-05-038-72/+72
| | | | llvm-svn: 331466
* [OPENMP] Add support for reductions on simd directives in targetAlexey Bataev2018-05-021-8/+26
| | | | | | | | regions. Added codegen for `simd reduction()` constructs in target directives. llvm-svn: 331393
* [OPENMP] Analyze the type of the mapped entity instead of its base.Alexey Bataev2018-05-021-1/+9
| | | | | | | 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
OpenPOWER on IntegriCloud