diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-06-05 20:32:32 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-06-05 20:32:32 +0000 |
commit | 4fb580c31475aa5cf1481927ed6cfefa7a14d5aa (patch) | |
tree | 72f23e462d48e48bf54078856ae4ff03eb673c71 | |
parent | 0f8a764e8fa831c037f07c109aea947ec4a1e4f5 (diff) | |
download | bcm5719-llvm-4fb580c31475aa5cf1481927ed6cfefa7a14d5aa.tar.gz bcm5719-llvm-4fb580c31475aa5cf1481927ed6cfefa7a14d5aa.zip |
AMDGPU: Remove amdgpu-max-work-group-size attribute
This has been deprecated for a long time, and mesa recently switched
to amdgpu-flat-work-group-size.
llvm-svn: 362641
-rw-r--r-- | llvm/docs/AMDGPUUsage.rst | 2 | ||||
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp | 11 | ||||
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/large-work-group-promote-alloca.ll | 2 | ||||
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/promote-alloca-calling-conv.ll | 2 |
4 files changed, 3 insertions, 14 deletions
diff --git a/llvm/docs/AMDGPUUsage.rst b/llvm/docs/AMDGPUUsage.rst index 38a8cbf2b7d..f4436045571 100644 --- a/llvm/docs/AMDGPUUsage.rst +++ b/llvm/docs/AMDGPUUsage.rst @@ -424,8 +424,6 @@ The AMDGPU backend supports the following LLVM IR attributes. argument block size for the implicit arguments. This varies by OS and language (for OpenCL see :ref:`opencl-kernel-implicit-arguments-appended-for-amdhsa-os-table`). - "amdgpu-max-work-group-size"="n" Specify the maximum work-group size that will be specifed - when the kernel is dispatched. "amdgpu-num-sgpr"="n" Specifies the number of SGPRs to use. Generated by the ``amdgpu_num_sgpr`` CLANG attribute [CLANG-ATTR]_. "amdgpu-num-vgpr"="n" Specifies the number of VGPRs to use. Generated by the diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp index 09b806bd06a..2a0f5654e5a 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp @@ -340,12 +340,6 @@ std::pair<unsigned, unsigned> AMDGPUSubtarget::getFlatWorkGroupSizes( std::pair<unsigned, unsigned> Default = getDefaultFlatWorkGroupSize(F.getCallingConv()); - // TODO: Do not process "amdgpu-max-work-group-size" attribute once mesa - // starts using "amdgpu-flat-work-group-size" attribute. - Default.second = AMDGPU::getIntegerAttribute( - F, "amdgpu-max-work-group-size", Default.second); - Default.first = std::min(Default.first, Default.second); - // Requested minimum/maximum flat work group sizes. std::pair<unsigned, unsigned> Requested = AMDGPU::getIntegerPairAttribute( F, "amdgpu-flat-work-group-size", Default); @@ -379,10 +373,7 @@ std::pair<unsigned, unsigned> AMDGPUSubtarget::getWavesPerEU( getMaxWavesPerEU(FlatWorkGroupSizes.second); bool RequestedFlatWorkGroupSize = false; - // TODO: Do not process "amdgpu-max-work-group-size" attribute once mesa - // starts using "amdgpu-flat-work-group-size" attribute. - if (F.hasFnAttribute("amdgpu-max-work-group-size") || - F.hasFnAttribute("amdgpu-flat-work-group-size")) { + if (F.hasFnAttribute("amdgpu-flat-work-group-size")) { Default.first = MinImpliedByFlatWorkGroupSize; RequestedFlatWorkGroupSize = true; } diff --git a/llvm/test/CodeGen/AMDGPU/large-work-group-promote-alloca.ll b/llvm/test/CodeGen/AMDGPU/large-work-group-promote-alloca.ll index 4fbf5e657df..9129c56bfd4 100644 --- a/llvm/test/CodeGen/AMDGPU/large-work-group-promote-alloca.ll +++ b/llvm/test/CodeGen/AMDGPU/large-work-group-promote-alloca.ll @@ -264,7 +264,7 @@ entry: ret void } -attributes #0 = { nounwind "amdgpu-max-work-group-size"="63" } +attributes #0 = { nounwind "amdgpu-flat-work-group-size"="63,63" } attributes #1 = { nounwind "amdgpu-waves-per-eu"="1,3" "amdgpu-flat-work-group-size"="256,256" } attributes #2 = { nounwind "amdgpu-waves-per-eu"="1,1" "amdgpu-flat-work-group-size"="1600,1600" } attributes #3 = { nounwind "amdgpu-waves-per-eu"="1,10" } diff --git a/llvm/test/CodeGen/AMDGPU/promote-alloca-calling-conv.ll b/llvm/test/CodeGen/AMDGPU/promote-alloca-calling-conv.ll index afe05cd79b2..15e8604930d 100644 --- a/llvm/test/CodeGen/AMDGPU/promote-alloca-calling-conv.ll +++ b/llvm/test/CodeGen/AMDGPU/promote-alloca-calling-conv.ll @@ -96,5 +96,5 @@ entry: declare i32 @llvm.amdgcn.workitem.id.x() #1 -attributes #0 = { nounwind "amdgpu-max-work-group-size"="64" } +attributes #0 = { nounwind "amdgpu-flat-work-group-size"="64,64" } attributes #1 = { nounwind readnone } |