summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/target_parallel_depend_codegen.cpp
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2019-05-21 19:42:01 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2019-05-21 19:42:01 +0000
commit66cdbb47d2f83c41f774d3063bb0112b75d86277 (patch)
treeee9054f835a3ec37156e581ec09f97fb9885f28e /clang/test/OpenMP/target_parallel_depend_codegen.cpp
parent32591ca4e29db3128036fb33ad5cc8ccde67aeb3 (diff)
downloadbcm5719-llvm-66cdbb47d2f83c41f774d3063bb0112b75d86277.tar.gz
bcm5719-llvm-66cdbb47d2f83c41f774d3063bb0112b75d86277.zip
[OpenMP] Add support for registering requires directives with the runtime
Summary: This patch adds support for the registration of the requires directives with the runtime. Each requires directive clause will enable a particular flag to be set. The set of flags is passed to the runtime to be checked for compatibility with other such flags coming from other object files. The registration function is called whenever OpenMP is present even if a requires directive is not present. This helps detect cases in which requires directives are used inconsistently. Reviewers: ABataev, AlexEichenberger, caomhin Reviewed By: ABataev, AlexEichenberger Subscribers: jholewinski, guansong, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60568 llvm-svn: 361298
Diffstat (limited to 'clang/test/OpenMP/target_parallel_depend_codegen.cpp')
-rw-r--r--clang/test/OpenMP/target_parallel_depend_codegen.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/OpenMP/target_parallel_depend_codegen.cpp b/clang/test/OpenMP/target_parallel_depend_codegen.cpp
index abd71351e15..678458cf97f 100644
--- a/clang/test/OpenMP/target_parallel_depend_codegen.cpp
+++ b/clang/test/OpenMP/target_parallel_depend_codegen.cpp
@@ -64,7 +64,7 @@
// CHECK: [[DESC:@.+]] = internal constant [[DSCTY]] { i32 1, [[DEVTY]]* getelementptr inbounds ([1 x [[DEVTY]]], [1 x [[DEVTY]]]* [[IMAGES]], i32 0, i32 0), [[ENTTY]]* [[ENTBEGIN]], [[ENTTY]]* [[ENTEND]] }, comdat($[[REGFN]])
// Check target registration is registered as a Ctor.
-// CHECK: appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* @[[REGFN]], i8* bitcast (void ()* @[[REGFN]] to i8*) }]
+// CHECK: appending global [2 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* @.omp_offloading.requires_reg, i8* null }, { i32, void ()*, i8* } { i32 0, void ()* @[[REGFN]], i8* bitcast (void ()* @[[REGFN]] to i8*) }]
template<typename tx, typename ty>
@@ -257,5 +257,8 @@ int foo(int n) {
// CHECK: call void [[HVT2]](i[[SZ]] [[BP1]])
// CHECK: ret i32 0
+// CHECK: define internal void @.omp_offloading.requires_reg()
+// CHECK: call void @__tgt_register_requires(i64 1)
+// CHECK: ret void
#endif
OpenPOWER on IntegriCloud