[PATCH] D94060: [OpenMP][AMDGPU] Use AMDGPU_KERNEL calling convention for entry function
Pushpinder Singh via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 5 23:03:50 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4909cb1a0fe9: [OpenMP][AMDGPU] Use AMDGPU_KERNEL calling convention for entry function (authored by pdhaliwal).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94060/new/
https://reviews.llvm.org/D94060
Files:
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/test/OpenMP/amdgcn_target_codegen.cpp
Index: clang/test/OpenMP/amdgcn_target_codegen.cpp
===================================================================
--- clang/test/OpenMP/amdgcn_target_codegen.cpp
+++ clang/test/OpenMP/amdgcn_target_codegen.cpp
@@ -9,7 +9,7 @@
#define N 1000
int test_amdgcn_target_tid_threads() {
-// CHECK-LABEL: define weak void @{{.*}}test_amdgcn_target_tid_threads
+// CHECK-LABEL: define weak amdgpu_kernel void @{{.*}}test_amdgcn_target_tid_threads
int arr[N];
@@ -25,7 +25,7 @@
}
int test_amdgcn_target_tid_threads_simd() {
-// CHECK-LABEL: define weak void @{{.*}}test_amdgcn_target_tid_threads_simd
+// CHECK-LABEL: define weak amdgpu_kernel void @{{.*}}test_amdgcn_target_tid_threads_simd
int arr[N];
Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp
===================================================================
--- clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -6471,6 +6471,8 @@
OutlinedFnID = llvm::ConstantExpr::getBitCast(OutlinedFn, CGM.Int8PtrTy);
OutlinedFn->setLinkage(llvm::GlobalValue::WeakAnyLinkage);
OutlinedFn->setDSOLocal(false);
+ if (CGM.getTriple().isAMDGCN())
+ OutlinedFn->setCallingConv(llvm::CallingConv::AMDGPU_KERNEL);
} else {
std::string Name = getName({EntryFnName, "region_id"});
OutlinedFnID = new llvm::GlobalVariable(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94060.314804.patch
Type: text/x-patch
Size: 1345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210106/4c3dc8b5/attachment.bin>
More information about the cfe-commits
mailing list