diff options
author | Sergey Dmitriev <serguei.n.dmitriev@intel.com> | 2019-10-15 18:42:47 +0000 |
---|---|---|
committer | Sergey Dmitriev <serguei.n.dmitriev@intel.com> | 2019-10-15 18:42:47 +0000 |
commit | ea4934045aa895f450dae600d12b7f5582915598 (patch) | |
tree | 695e3a25c26637f904bfe86d1ccba0f960b0f4f4 /test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp | |
parent | 2a0fc7108d71626c4f5ba4dbef1a369bc110914f (diff) | |
download | clang-ea4934045aa895f450dae600d12b7f5582915598.tar.gz |
[Clang][OpenMP Offload] Move offload registration code to the wrapper
The final list of OpenMP offload targets becomes known only at the link time and since offload registration code depends on the targets list it makes sense to delay offload registration code generation to the link time instead of adding it to the host part of every fat object. This patch moves offload registration code generation from clang to the offload wrapper tool.
This is the last part of the OpenMP linker script elimination patch https://reviews.llvm.org/D64943
Differential Revision: https://reviews.llvm.org/D68746
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp')
-rw-r--r-- | test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp b/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp index e2cdd39145..b136e7b75e 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp @@ -40,13 +40,9 @@ // CHECK-DAG: [[TT:%.+]] = type { i64, i8 } // CHECK-DAG: [[ENTTY:%.+]] = type { i8*, i8*, i[[SZ:32|64]], i32, i32 } -// CHECK-DAG: [[DEVTY:%.+]] = type { i8*, i8*, [[ENTTY]]*, [[ENTTY]]* } -// CHECK-DAG: [[DSCTY:%.+]] = type { i32, [[DEVTY]]*, [[ENTTY]]*, [[ENTTY]]* } // TCHECK: [[ENTTY:%.+]] = type { i8*, i8*, i{{32|64}}, i32, i32 } -// CHECK-DAG: $[[REGFN:\.omp_offloading\..+]] = comdat - // CHECK-DAG: [[SIZET:@.+]] = private unnamed_addr constant [2 x i64] [i64 0, i64 4] // CHECK-DAG: [[MAPT:@.+]] = private unnamed_addr constant [2 x i64] [i64 544, i64 800] // CHECK-DAG: @{{.*}} = weak constant i8 0 @@ -55,16 +51,8 @@ // TCHECK: @{{.+}} = {{.*}}constant [[ENTTY]] // TCHECK-NOT: @{{.+}} = weak constant [[ENTTY]] -// Check if offloading descriptor is created. -// CHECK: [[ENTBEGIN:@.+]] = external hidden constant [[ENTTY]] -// CHECK: [[ENTEND:@.+]] = external hidden constant [[ENTTY]] -// CHECK: [[DEVBEGIN:@.+]] = extern_weak constant i8 -// CHECK: [[DEVEND:@.+]] = extern_weak constant i8 -// CHECK: [[IMAGES:@.+]] = internal unnamed_addr constant [1 x [[DEVTY]]] [{{.+}} { i8* [[DEVBEGIN]], i8* [[DEVEND]], [[ENTTY]]* [[ENTBEGIN]], [[ENTTY]]* [[ENTEND]] }], comdat($[[REGFN]]) -// CHECK: [[DESC:@.+]] = internal constant [[DSCTY]] { i32 1, [[DEVTY]]* getelementptr inbounds ([1 x [[DEVTY]]], [1 x [[DEVTY]]]* [[IMAGES]], i32 0, i32 0), [[ENTTY]]* [[ENTBEGIN]], [[ENTTY]]* [[ENTEND]] }, comdat($[[REGFN]]) - // Check target registration is registered as a Ctor. -// CHECK: appending global [2 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* @.omp_offloading.requires_reg, i8* null }, { i32, void ()*, i8* } { i32 0, void ()* @[[REGFN]], i8* bitcast (void ()* @[[REGFN]] to i8*) }] +// CHECK: appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* @.omp_offloading.requires_reg, i8* null }] template<typename tx, typename ty> |