[llvm] 8a24208 - [AMDGPU] Simplify AMDGPUSubtarget::getWavesPerEU. NFC.
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 14 06:20:20 PDT 2020
Author: Jay Foad
Date: 2020-07-14T14:20:02+01:00
New Revision: 8a24208977c27d6ae891833b027471e187fe53a5
URL: https://github.com/llvm/llvm-project/commit/8a24208977c27d6ae891833b027471e187fe53a5
DIFF: https://github.com/llvm/llvm-project/commit/8a24208977c27d6ae891833b027471e187fe53a5.diff
LOG: [AMDGPU] Simplify AMDGPUSubtarget::getWavesPerEU. NFC.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
index 2849645863a5..213788ae0f67 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
@@ -411,11 +411,8 @@ std::pair<unsigned, unsigned> AMDGPUSubtarget::getWavesPerEU(
unsigned MinImpliedByFlatWorkGroupSize =
getWavesPerEUForWorkGroup(FlatWorkGroupSizes.second);
Default.first = MinImpliedByFlatWorkGroupSize;
- bool RequestedFlatWorkGroupSize = false;
-
- if (F.hasFnAttribute("amdgpu-flat-work-group-size")) {
- RequestedFlatWorkGroupSize = true;
- }
+ bool RequestedFlatWorkGroupSize =
+ F.hasFnAttribute("amdgpu-flat-work-group-size");
// Requested minimum/maximum number of waves per execution unit.
std::pair<unsigned, unsigned> Requested = AMDGPU::getIntegerPairAttribute(
@@ -427,9 +424,7 @@ std::pair<unsigned, unsigned> AMDGPUSubtarget::getWavesPerEU(
// Make sure requested values do not violate subtarget's specifications.
if (Requested.first < getMinWavesPerEU() ||
- Requested.first > getMaxWavesPerEU())
- return Default;
- if (Requested.second > getMaxWavesPerEU())
+ Requested.second > getMaxWavesPerEU())
return Default;
// Make sure requested values are compatible with values implied by requested
More information about the llvm-commits
mailing list