Skip to content

Commit 7c9c331

Browse files
authored
[NFC][AMDGPU] Remove redundant code in AMDGPUSubtarget::getWavesPerEU (llvm#155201)
1 parent c58e22e commit 7c9c331

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,19 +209,16 @@ std::pair<unsigned, unsigned>
209209
AMDGPUSubtarget::getWavesPerEU(const Function &F) const {
210210
// Default/requested minimum/maximum flat work group sizes.
211211
std::pair<unsigned, unsigned> FlatWorkGroupSizes = getFlatWorkGroupSizes(F);
212-
// Minimum number of bytes allocated in the LDS.
213-
unsigned LDSBytes = AMDGPU::getIntegerPairAttribute(F, "amdgpu-lds-size",
214-
{0, UINT32_MAX}, true)
215-
.first;
216-
return getWavesPerEU(FlatWorkGroupSizes, LDSBytes, F);
212+
return getWavesPerEU(F, FlatWorkGroupSizes);
217213
}
218214

219215
std::pair<unsigned, unsigned> AMDGPUSubtarget::getWavesPerEU(
220216
const Function &F, std::pair<unsigned, unsigned> FlatWorkGroupSizes) const {
221217
// Minimum number of bytes allocated in the LDS.
222-
unsigned LDSBytes = AMDGPU::getIntegerPairAttribute(F, "amdgpu-lds-size",
223-
{0, UINT32_MAX}, true)
224-
.first;
218+
unsigned LDSBytes =
219+
AMDGPU::getIntegerPairAttribute(F, "amdgpu-lds-size", {0, UINT32_MAX},
220+
/*OnlyFirstRequired=*/true)
221+
.first;
225222
return getWavesPerEU(FlatWorkGroupSizes, LDSBytes, F);
226223
}
227224

0 commit comments

Comments
 (0)