diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-15 12:52:43 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-09-15 12:52:43 +0000 |
| commit | 25e5b4465494ff106fec9b5623e9d74e6b242e79 (patch) | |
| tree | b9e0e6b8773322f22b9c385b4e1c4783a5f95717 /clang/test/OpenMP/sections_firstprivate_codegen.cpp | |
| parent | 7d4038dc5a0a6095324d3f1462fc4402a8a6eac3 (diff) | |
| download | bcm5719-llvm-25e5b4465494ff106fec9b5623e9d74e6b242e79.tar.gz bcm5719-llvm-25e5b4465494ff106fec9b5623e9d74e6b242e79.zip | |
[OPENMP] Emit __kmpc_cancel_barrier() and code for 'cancellation point' only if 'cancel' is found.
Patch improves codegen for OpenMP constructs. If the OpenMP region does not have internal 'cancel' construct, a call to 'void __kmpc_barrier()' runtime function is generated for all implicit/explicit barriers. If the region has inner 'cancel' directive, then
```
if (__kmpc_cancel_barrier())
exit from outer construct;
```
code is generated.
Also, the code for 'canellation point' directive is not generated if parent directive does not have 'cancel' directive.
llvm-svn: 247681
Diffstat (limited to 'clang/test/OpenMP/sections_firstprivate_codegen.cpp')
| -rw-r--r-- | clang/test/OpenMP/sections_firstprivate_codegen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/OpenMP/sections_firstprivate_codegen.cpp b/clang/test/OpenMP/sections_firstprivate_codegen.cpp index b5db2c58714..c84f27598b9 100644 --- a/clang/test/OpenMP/sections_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/sections_firstprivate_codegen.cpp @@ -92,7 +92,7 @@ int main() { // LAMBDA: store i{{[0-9]+}}* [[G_PRIVATE_ADDR]], i{{[0-9]+}}** [[G_PRIVATE_ADDR_REF]] // LAMBDA: call void [[INNER_LAMBDA:@.+]](%{{.+}}* [[ARG]]) // LAMBDA: call void @__kmpc_for_static_fini( - // LAMBDA: call i32 @__kmpc_cancel_barrier( + // LAMBDA: call void @__kmpc_barrier( #pragma omp section [&]() { // LAMBDA: define {{.+}} void [[INNER_LAMBDA]](%{{.+}}* [[ARG_PTR:%.+]]) @@ -135,7 +135,7 @@ int main() { // BLOCKS-NOT: [[G]]{{[[^:word:]]}} // BLOCKS: call void {{%.+}}(i8 // BLOCKS: call void @__kmpc_for_static_fini( - // BLOCKS: call i32 @__kmpc_cancel_barrier( + // BLOCKS: call void @__kmpc_barrier( #pragma omp section ^{ // BLOCKS: define {{.+}} void {{@.+}}(i8* @@ -268,7 +268,7 @@ int main() { // CHECK-DAG: call {{.*}} [[S_INT_TY_DESTR]]([[S_INT_TY]]* // CHECK: [[GTID_REF:%.+]] = load i{{[0-9]+}}*, i{{[0-9]+}}** [[GTID_ADDR_ADDR]] // CHECK: [[GTID:%.+]] = load i{{[0-9]+}}, i{{[0-9]+}}* [[GTID_REF]] -// CHECK: call i32 @__kmpc_cancel_barrier(%{{.+}}* [[SECTIONS_BARRIER_LOC]], i{{[0-9]+}} [[GTID]]) +// CHECK: call void @__kmpc_barrier(%{{.+}}* [[SECTIONS_BARRIER_LOC]], i{{[0-9]+}} [[GTID]]) // CHECK: ret void #endif |

