summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/target_enter_data_codegen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP] Add support for close map modifier in ClangGheorghe-Teodor Bercea2019-08-091-0/+131
| | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for the close map modifier in Clang. This ensures that the new map type is marked and passed to the OpenMP runtime appropriately. Additional regression tests have been merged from patch D55892 (author @saghir). Reviewers: ABataev, caomhin, jdoerfert, kkwli0 Reviewed By: ABataev Subscribers: kkwli0, Hahnfeld, saghir, guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65341 llvm-svn: 368491
* [OPENMP]Fix PR41966: type mismatch in runtime functions.Alexey Bataev2019-06-251-5/+6
| | | | | | | Target-based runtime functions use int64_t type for sizes, while the compiler uses size_t type. It leads to miscompilation in 32 bit mode. llvm-svn: 364327
* The patch adds support for the new map interface between clang and ↵Alexey Bataev2018-07-191-6/+8
| | | | | | | | | | | 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] Support for -fopenmp-simd option with compilation of simd loopsAlexey Bataev2017-12-291-0/+42
| | | | | | | | | only. Added support for -fopenmp-simd option that allows compilation of simd-based constructs without emission of OpenMP runtime calls. llvm-svn: 321560
* [OPENMP] Add codegen for target data constructs with `nowait` clause.Alexey Bataev2017-12-141-2/+2
| | | | | | Added codegen for the `nowait` clause in target data constructs. llvm-svn: 320717
* [Clang][OpenMP] New clang/libomptarget map interface: new function ↵George Rokos2017-11-211-12/+14
| | | | | | | | | | | signatures, clang-side This clang patch changes the __tgt_* API function signatures in preparation for the new map interface. Changes are: Device IDs 32bits --> 64bits, Flags 32bits --> 64bits Differential revision: https://reviews.llvm.org/D40281 llvm-svn: 318789
* [OPENMP][DEBUG] Generate second function with correct arg types.Alexey Bataev2017-06-291-23/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if the some of the parameters are captured by value, this argument is converted to uintptr_t type and thus we loosing the debug info about real type of the argument (captured variable): ``` void @.outlined_function.(uintptr %par); ... %a = alloca i32 %a.casted = alloca uintptr %cast = bitcast uintptr* %a.casted to i32* %a.val = load i32, i32 *%a store i32 %a.val, i32 *%cast %a.casted.val = load uintptr, uintptr* %a.casted call void @.outlined_function.(uintptr %a.casted.val) ... ``` To resolve this problem, in debug mode a speciall external wrapper function is generated, that calls the outlined function with the correct parameters types: ``` void @.wrapper.(uintptr %par) { %a = alloca i32 %cast = bitcast i32* %a to uintptr* store uintptr %par, uintptr *%cast %a.val = load i32, i32* %a call void @.outlined_function.(i32 %a) ret void } void @.outlined_function.(i32 %par); ... %a = alloca i32 %a.casted = alloca uintptr %cast = bitcast uintptr* %a.casted to i32* %a.val = load i32, i32 *%a store i32 %a.val, i32 *%cast %a.casted.val = load uintptr, uintptr* %a.casted call void @.wrapper.(uintptr %a.casted.val) ... ``` llvm-svn: 306697
* [OpenMP] Use fopenmp prefix for all options introduced by the offloading ↵Samuel Antao2016-06-301-27/+27
| | | | | | | | | | | | | | implementation. Summary: This patch changes the options used by offloading to start with -fopenmp instead of -fomp. This makes the option naming more consistent and materializes a suggestion by Richard Smith in http://reviews.llvm.org/D9888. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, ABataev Subscribers: kkwli0, cfe-commits, caomhin Differential Revision: http://reviews.llvm.org/D21841 llvm-svn: 274283
* [OpenMP] Adjust map type bits according to latest spec and use zero size ↵Samuel Antao2016-05-261-5/+5
| | | | | | | | | | | | | | array sections for pointers. Summary: This patch changes the bits used to specify the map types according to the latest version of the libomptarget document and add the support for zero size array section when pointers are being implicitly mapped. This completes the missing new 4.5 map semantics. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D20111 llvm-svn: 270868
* [OpenMP] Check for associated statements with hasAssociatedStmt() when ↵Samuel Antao2016-05-081-0/+28
| | | | | | | | | | | | | | scanning for device code. Summary: `getAssociatedStmt()` contains an assertion that assumes the statement always exists. In device code scanning, we need to look into the associated statement therefore we check its existence. This patch replaces `getAssociatedStmt` by `hasAssociatedStmt` so that we do not trigger the assertion for directives that happen not to have an associated statement (e.g target enter/exit data). Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, caomhin Differential Revision: http://reviews.llvm.org/D19812 llvm-svn: 268870
* [OpenMP] Code generation for target enter data directiveSamuel Antao2016-04-271-0/+221
Summary: This patch adds support for the target enter data directive code generation. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17368 llvm-svn: 267812
OpenPOWER on IntegriCloud