From 2377fe95c6beeba5cbba356fee7fba32257bbce2 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 10 Sep 2015 08:12:02 +0000 Subject: [OPENMP] Outlined function for parallel and other regions with list of captured variables. Currently all variables used in OpenMP regions are captured into a record and passed to outlined functions in this record. It may result in some poor performance because of too complex analysis later in optimization passes. Patch makes to emit outlined functions for parallel-based regions with a list of captured variables. It reduces code for 2*n GEPs, stores and loads at least. Codegen for task-based regions remains unchanged because runtime requires that all captured variables are passed in captured record. llvm-svn: 247251 --- clang/test/OpenMP/task_if_codegen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/test/OpenMP/task_if_codegen.cpp') diff --git a/clang/test/OpenMP/task_if_codegen.cpp b/clang/test/OpenMP/task_if_codegen.cpp index cbdf117a05c..5992be02a84 100644 --- a/clang/test/OpenMP/task_if_codegen.cpp +++ b/clang/test/OpenMP/task_if_codegen.cpp @@ -21,14 +21,14 @@ int Arg; // CHECK-LABEL: define void @{{.+}}gtid_test void gtid_test() { -// CHECK: call void {{.+}} @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{.+}} 1, {{.+}}* [[GTID_TEST_REGION1:@.+]] to void +// CHECK: call void {{.+}} @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{.+}} 0, {{.+}}* [[GTID_TEST_REGION1:@.+]] to void #pragma omp parallel #pragma omp task if (task: false) gtid_test(); // CHECK: ret void } -// CHECK: define internal void [[GTID_TEST_REGION1]](i32* [[GTID_PARAM:%.+]], i +// CHECK: define internal void [[GTID_TEST_REGION1]](i32* noalias [[GTID_PARAM:%.+]], i // CHECK: store i32* [[GTID_PARAM]], i32** [[GTID_ADDR_REF:%.+]], // CHECK: [[GTID_ADDR:%.+]] = load i32*, i32** [[GTID_ADDR_REF]] // CHECK: [[GTID:%.+]] = load i32, i32* [[GTID_ADDR]] -- cgit v1.2.3