diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-07-09 17:43:58 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-07-09 17:43:58 +0000 |
commit | b99dcb5f31049381a7ca29def6edeb48da3217b0 (patch) | |
tree | a82991801b46b40459cac79a512640dc455708ad /clang/test/OpenMP/nvptx_data_sharing.cpp | |
parent | 47170b3153a4a494bbfd76d31e2fbb754dda34ec (diff) | |
download | bcm5719-llvm-b99dcb5f31049381a7ca29def6edeb48da3217b0.tar.gz bcm5719-llvm-b99dcb5f31049381a7ca29def6edeb48da3217b0.zip |
[OPENMP, NVPTX] Do not globalize local variables in parallel regions.
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
Diffstat (limited to 'clang/test/OpenMP/nvptx_data_sharing.cpp')
-rw-r--r-- | clang/test/OpenMP/nvptx_data_sharing.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/test/OpenMP/nvptx_data_sharing.cpp b/clang/test/OpenMP/nvptx_data_sharing.cpp index 634681b2f78..eb0acde2998 100644 --- a/clang/test/OpenMP/nvptx_data_sharing.cpp +++ b/clang/test/OpenMP/nvptx_data_sharing.cpp @@ -83,11 +83,10 @@ void test_ds(){ /// outlined function for the second parallel region /// // CK1: define internal void @{{.+}}(i32* noalias %{{.+}}, i32* noalias %{{.+}}, i32* dereferenceable{{.+}}, i32* dereferenceable{{.+}}) -// CK1: [[RES:%.+]] = call i8* @__kmpc_data_sharing_push_stack(i64 4, i16 0) -// CK1: [[GLOBALS:%.+]] = bitcast i8* [[RES]] to [[GLOBAL_TY:%.+]]* -// CK1: [[C_ADDR:%.+]] = getelementptr inbounds [[GLOBAL_TY]], [[GLOBAL_TY]]* [[GLOBALS]], i32 0, i32 0 +// CK1-NOT: call i8* @__kmpc_data_sharing_push_stack( +// CK1: [[C_ADDR:%.+]] = alloca i32, // CK1: store i32* [[C_ADDR]], i32** % -// CK1: call void @__kmpc_data_sharing_pop_stack(i8* [[RES]]) +// CK1i-NOT: call void @__kmpc_data_sharing_pop_stack( /// ========= In the data sharing wrapper function ========= /// |