r268740 - Revert "AMDGPU/SI: Use amdgpu_kernel calling convention for OpenCL kernels."
Nikolay Haustov via cfe-commits
cfe-commits at lists.llvm.org
Fri May 6 08:00:51 PDT 2016
Author: nhaustov
Date: Fri May 6 10:00:51 2016
New Revision: 268740
URL: http://llvm.org/viewvc/llvm-project?rev=268740&view=rev
Log:
Revert "AMDGPU/SI: Use amdgpu_kernel calling convention for OpenCL kernels."
This reverts commit f7053ec90d0fc56f0837e43c2c759e85b56c21a1.
It broke calling OpenCL kernel from another kernel.
Removed:
cfe/trunk/test/CodeGenOpenCL/amdgpu-calling-conv.cl
Modified:
cfe/trunk/lib/CodeGen/TargetInfo.cpp
cfe/trunk/test/CodeGenOpenCL/amdgpu-num-gpr-attr.cl
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=268740&r1=268739&r2=268740&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Fri May 6 10:00:51 2016
@@ -6826,14 +6826,6 @@ void AMDGPUTargetCodeGenInfo::setTargetA
if (!FD)
return;
- if (M.getLangOpts().OpenCL) {
- if (FD->hasAttr<OpenCLKernelAttr>()) {
- // Set amdgpu_kernel calling convention for OpenCL kernels.
- llvm::Function *Fn = cast<llvm::Function>(GV);
- Fn->setCallingConv(llvm::CallingConv::AMDGPU_KERNEL);
- }
- }
-
if (const auto Attr = FD->getAttr<AMDGPUNumVGPRAttr>()) {
llvm::Function *F = cast<llvm::Function>(GV);
uint32_t NumVGPR = Attr->getNumVGPR();
Removed: cfe/trunk/test/CodeGenOpenCL/amdgpu-calling-conv.cl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/amdgpu-calling-conv.cl?rev=268739&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenOpenCL/amdgpu-calling-conv.cl (original)
+++ cfe/trunk/test/CodeGenOpenCL/amdgpu-calling-conv.cl (removed)
@@ -1,12 +0,0 @@
-// REQUIRES: amdgpu-registered-target
-// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s
-
-// CHECK: define amdgpu_kernel void @calling_conv_amdgpu_kernel()
-kernel void calling_conv_amdgpu_kernel()
-{
-}
-
-// CHECK: define void @calling_conv_none()
-void calling_conv_none()
-{
-}
Modified: cfe/trunk/test/CodeGenOpenCL/amdgpu-num-gpr-attr.cl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/amdgpu-num-gpr-attr.cl?rev=268740&r1=268739&r2=268740&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenOpenCL/amdgpu-num-gpr-attr.cl (original)
+++ cfe/trunk/test/CodeGenOpenCL/amdgpu-num-gpr-attr.cl Fri May 6 10:00:51 2016
@@ -5,23 +5,23 @@
__attribute__((amdgpu_num_vgpr(64))) // expected-no-diagnostics
kernel void test_num_vgpr64() {
-// CHECK: define amdgpu_kernel void @test_num_vgpr64() [[ATTR_VGPR64:#[0-9]+]]
+// CHECK: define void @test_num_vgpr64() [[ATTR_VGPR64:#[0-9]+]]
}
__attribute__((amdgpu_num_sgpr(32))) // expected-no-diagnostics
kernel void test_num_sgpr32() {
-// CHECK: define amdgpu_kernel void @test_num_sgpr32() [[ATTR_SGPR32:#[0-9]+]]
+// CHECK: define void @test_num_sgpr32() [[ATTR_SGPR32:#[0-9]+]]
}
__attribute__((amdgpu_num_vgpr(64), amdgpu_num_sgpr(32))) // expected-no-diagnostics
kernel void test_num_vgpr64_sgpr32() {
-// CHECK: define amdgpu_kernel void @test_num_vgpr64_sgpr32() [[ATTR_VGPR64_SGPR32:#[0-9]+]]
+// CHECK: define void @test_num_vgpr64_sgpr32() [[ATTR_VGPR64_SGPR32:#[0-9]+]]
}
__attribute__((amdgpu_num_sgpr(20), amdgpu_num_vgpr(40))) // expected-no-diagnostics
kernel void test_num_sgpr20_vgpr40() {
-// CHECK: define amdgpu_kernel void @test_num_sgpr20_vgpr40() [[ATTR_SGPR20_VGPR40:#[0-9]+]]
+// CHECK: define void @test_num_sgpr20_vgpr40() [[ATTR_SGPR20_VGPR40:#[0-9]+]]
}
__attribute__((amdgpu_num_vgpr(0))) // expected-no-diagnostics
More information about the cfe-commits
mailing list