]> granicus.if.org Git - llvm/commitdiff
AMDGPU: Remove amdgpu-max-work-group-size attribute
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 5 Jun 2019 20:32:32 +0000 (20:32 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 5 Jun 2019 20:32:32 +0000 (20:32 +0000)
This has been deprecated for a long time, and mesa recently switched
to amdgpu-flat-work-group-size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362641 91177308-0d34-0410-b5e6-96231b3b80d8

docs/AMDGPUUsage.rst
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
test/CodeGen/AMDGPU/large-work-group-promote-alloca.ll
test/CodeGen/AMDGPU/promote-alloca-calling-conv.ll

index 38a8cbf2b7dc295f745ace872db0850fb3fc7099..f4436045571437cb6f5893466c629897a5ddfa2d 100644 (file)
@@ -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
index 09b806bd06a5540448fb3f26e7c99683bbd5064a..2a0f5654e5a891d1f2196868846c235eedbc6520 100644 (file)
@@ -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;
   }
index 4fbf5e657dffcce4aeec74d19810b7deb97aede5..9129c56bfd47251166dbe62953d5ab4a2fc2c9d5 100644 (file)
@@ -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" }
index afe05cd79b2a4fd2637e8bd87d111dd2a91f1d64..15e8604930d59d9e53f424b8220bee14fd3a457e 100644 (file)
@@ -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 }