diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-05-17 08:55:33 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-05-17 08:55:33 +0000 |
commit | 7ace49dff163a1694738ae969c4fc8492382b935 (patch) | |
tree | 236cf333c8595712e2798210889a34d8ee377b89 /clang/test/OpenMP/nvptx_teams_codegen.cpp | |
parent | 1aaf87e91de46f251193664f3eed180c8609e403 (diff) | |
download | bcm5719-llvm-7ace49dff163a1694738ae969c4fc8492382b935.tar.gz bcm5719-llvm-7ace49dff163a1694738ae969c4fc8492382b935.zip |
[OPENMP] Pass scalar firstprivate vars by value.
For better performance and to unify code with offloading part we pass
scalar firstprivate values by value, instead of by reference. It will
remove some extra copying operations.
llvm-svn: 269751
Diffstat (limited to 'clang/test/OpenMP/nvptx_teams_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/nvptx_teams_codegen.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/clang/test/OpenMP/nvptx_teams_codegen.cpp b/clang/test/OpenMP/nvptx_teams_codegen.cpp index f59c7ba3d89..170c1303ec4 100644 --- a/clang/test/OpenMP/nvptx_teams_codegen.cpp +++ b/clang/test/OpenMP/nvptx_teams_codegen.cpp @@ -45,13 +45,12 @@ int main (int argc, char **argv) { // CK1-NEXT: } // target region in template -// CK1: define {{.*}}void @{{[^,]+}}(i{{.+}}***{{.+}} [[ARGC:%.+]]) +// CK1: define {{.*}}void @{{[^,]+}}(i{{.+}}** [[ARGC:%.+]]) // CK1: [[ARGCADDR_PTR:%.+]] = alloca i{{.+}}***, -// CK1: [[ARGCADDR:%.+]] = alloca i{{.+}}***, -// CK1: store i{{.+}}*** [[ARGC]], i{{.+}}**** [[ARGCADDR]] -// CK1: [[ARGCADDR_REF:%.+]] = load i{{.+}}***, i{{.+}}**** [[ARGCADDR]], -// CK1: store i8*** [[ARGCADDR_REF]], i8**** [[ARGCADDR_PTR]], -// CK1: [[ARGCADDR_PTR_REF:%.+]] = load i{{.+}}***, i{{.+}}**** [[ARGCADDR_PTR]], +// CK1: [[ARGCADDR:%.+]] = alloca i{{.+}}**, +// CK1: store i{{.+}}** [[ARGC]], i{{.+}}*** [[ARGCADDR]] +// CK1: store i8*** [[ARGCADDR]], i8**** [[ARGCADDR_PTR]], +// CK1: [[ARGCADDR_PTR_REF:%.+]] = load i{{.+}}**, i{{.+}}*** [[ARGCADDR_PTR]], // CK1: store i{{[0-9]+}}** null, i{{[0-9]+}}*** [[ARGCADDR_PTR_REF]], // CK1-NOT: call {{.*}}void (%ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_teams( // CK1: ret void @@ -113,19 +112,16 @@ int main (int argc, char **argv) { // CK2-NOT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_teams( // CK2: ret -// CK2: define {{.*}}void @{{[^,]+}}(i{{[0-9]+}}*{{.+}} [[A_IN:%.+]], i{{[0-9]+}}*{{.+}} [[BP:%.+]], i{{[0-9]+}}***{{.+}} [[ARGC:%.+]]) +// CK2: define {{.*}}void @{{[^,]+}}(i{{[0-9]+}} [[A_IN:%.+]], i{{[0-9]+}} [[BP:%.+]], i{{[0-9]+}}** [[ARGC:%.+]]) // CK2: [[ARGCADDR_PTR:%.+]] = alloca i{{[0-9]+}}***, -// CK2: [[AADDR:%.+]] = alloca i{{[0-9]+}}*, -// CK2: [[BADDR:%.+]] = alloca i{{[0-9]+}}*, -// CK2: [[ARGCADDR:%.+]] = alloca i{{[0-9]+}}***, +// CK2: [[AADDR:%.+]] = alloca i{{[0-9]+}}, +// CK2: [[BADDR:%.+]] = alloca i{{[0-9]+}}, +// CK2: [[ARGCADDR:%.+]] = alloca i{{[0-9]+}}**, // CK2-NOT: {{%.+}} = call i32 @__kmpc_global_thread_num( -// CK2: store i{{[0-9]+}}* [[A_IN]], i{{[0-9]+}}** [[AADDR]], -// CK2: store i{{[0-9]+}}* [[B_IN]], i{{[0-9]+}}** [[BADDR]], -// CK2: store i{{[0-9]+}}*** [[ARGC]], i{{[0-9]+}}**** [[ARGCADDR]], -// CK2: [[A_ADDR_VAL:%.+]] = load i32*, i32** [[AADDR]] -// CK2: [[B_ADDR_VAL:%.+]] = load i32*, i32** [[BADDR]] -// CK2: [[ARGC_ADDR_VAL:%.+]] = load i{{[0-9]+}}***, i{{[0-9]+}}**** [[ARGCADDR]] -// CK2: store i{{[0-9]+}}*** [[ARGC_ADDR_VAL]], i{{[0-9]+}}**** [[ARGCADDR_PTR]], +// CK2: store i{{[0-9]+}} [[A_IN]], i{{[0-9]+}}* [[AADDR]], +// CK2: store i{{[0-9]+}} [[B_IN]], i{{[0-9]+}}* [[BADDR]], +// CK2: store i{{[0-9]+}}** [[ARGC]], i{{[0-9]+}}*** [[ARGCADDR]], +// CK2: store i{{[0-9]+}}*** [[ARGCADDR]], i{{[0-9]+}}**** [[ARGCADDR_PTR]], // CK2: [[ARGCADDR_PTR_REF:%.+]] = load i{{[0-9]+}}***, i{{[0-9]+}}**** [[ARGCADDR_PTR]], // CK2: store i{{[0-9]+}}** null, i{{[0-9]+}}*** [[ARGCADDR_PTR_REF]], // CK2-NOT: {{.+}} = call i32 @__kmpc_push_num_teams( |