summaryrefslogtreecommitdiffstats
path: root/polly/test/CodeGen/OpenMP
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2012-11-01 05:34:55 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2012-11-01 05:34:55 +0000
commitebe8c8cea23a138441ab5ab08fe62cf47a09e9d0 (patch)
tree979673ff59e56756a6cf8b5f93b676e209acf715 /polly/test/CodeGen/OpenMP
parent177982c478bd1344e68937a10082fd698b42a106 (diff)
downloadbcm5719-llvm-ebe8c8cea23a138441ab5ab08fe62cf47a09e9d0.tar.gz
bcm5719-llvm-ebe8c8cea23a138441ab5ab08fe62cf47a09e9d0.zip
Codegen: Selectively copy in array addresses for OpenMP code
The detection of values that need to be copied in to the generated OpenMP subfunction also detects the array base addresses needed in the SCoP. Hence, it is not necessary to unconditionally copy all the base addresses to the generated function. Test cases are modified to reflect this change. Arrays which are global variables do not occur in the struct passed to the subfunction anymore. A test case for base address copy-in is added in copy_in_array.{c,ll}. Committed with slight modifications Contributed by: Armin Groesslinger <armin.groesslinger@uni-passau.de> llvm-svn: 167215
Diffstat (limited to 'polly/test/CodeGen/OpenMP')
-rw-r--r--polly/test/CodeGen/OpenMP/copy_in_argument.ll2
-rw-r--r--polly/test/CodeGen/OpenMP/copy_in_temporary.ll2
-rw-r--r--polly/test/CodeGen/OpenMP/simple_nested_loop.ll8
-rw-r--r--polly/test/CodeGen/OpenMP/structnames.ll4
4 files changed, 7 insertions, 9 deletions
diff --git a/polly/test/CodeGen/OpenMP/copy_in_argument.ll b/polly/test/CodeGen/OpenMP/copy_in_argument.ll
index cc45cf65a3c..34e691e12b9 100644
--- a/polly/test/CodeGen/OpenMP/copy_in_argument.ll
+++ b/polly/test/CodeGen/OpenMP/copy_in_argument.ll
@@ -31,4 +31,4 @@ for.end: ; preds = %for.body
ret void
}
-; CHECK: %omp.userContext = alloca { [100 x float]*, float }
+; CHECK: %omp.userContext = alloca { float }
diff --git a/polly/test/CodeGen/OpenMP/copy_in_temporary.ll b/polly/test/CodeGen/OpenMP/copy_in_temporary.ll
index 1bd2352cada..f84edf88442 100644
--- a/polly/test/CodeGen/OpenMP/copy_in_temporary.ll
+++ b/polly/test/CodeGen/OpenMP/copy_in_temporary.ll
@@ -32,4 +32,4 @@ for.end: ; preds = %for.body
ret void
}
-; CHECK: %omp.userContext = alloca { [100 x float]*, float }
+; CHECK: %omp.userContext = alloca { float }
diff --git a/polly/test/CodeGen/OpenMP/simple_nested_loop.ll b/polly/test/CodeGen/OpenMP/simple_nested_loop.ll
index 66877b21355..5ef6bb1bb5f 100644
--- a/polly/test/CodeGen/OpenMP/simple_nested_loop.ll
+++ b/polly/test/CodeGen/OpenMP/simple_nested_loop.ll
@@ -55,12 +55,10 @@ entry:
declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
-; CHECK: %omp.userContext = alloca { i32, [10 x double]* }
-; CHECK: getelementptr inbounds { i32, [10 x double]* }* %omp.userContext, i32 0, i32 0
+; CHECK: %omp.userContext = alloca { i32 }
+; CHECK: getelementptr inbounds { i32 }* %omp.userContext, i32 0, i32 0
; CHECK: store i32 %polly.loopiv, i32* %1
-; CHECK: getelementptr inbounds { i32, [10 x double]* }* %omp.userContext, i32 0, i32 1
-; CHECK: store [10 x double]* @A, [10 x double]** %2
-; CHECK: %omp_data = bitcast { i32, [10 x double]* }* %omp.userContext to i8*
+; CHECK: %omp_data = bitcast { i32 }* %omp.userContext to i8*
; CHECK: call void @GOMP_parallel_loop_runtime_start(void (i8*)* @loop_openmp.omp_subfn, i8* %omp_data, i32 0, i32 0, i32 10, i32 1)
; CHECK: call void @loop_openmp.omp_subfn(i8* %omp_data)
; CHECK: call void @GOMP_parallel_end()
diff --git a/polly/test/CodeGen/OpenMP/structnames.ll b/polly/test/CodeGen/OpenMP/structnames.ll
index 5ce7132801d..3e17e248e9a 100644
--- a/polly/test/CodeGen/OpenMP/structnames.ll
+++ b/polly/test/CodeGen/OpenMP/structnames.ll
@@ -72,6 +72,6 @@ entry:
declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
-; CHECK: %omp.userContext = alloca { [5 x float]*, [5 x float]* }
-; CHECK: %omp.userContext1 = alloca { i32, [5 x float]*, [5 x float]* }
+; CHECK: %omp.userContext = alloca {}
+; CHECK: %omp.userContext1 = alloca { i32 }
OpenPOWER on IntegriCloud