[llvm] [AMDGPU][NFC] Remove duplicate code by using getAddressableLocalMemor… (PR #104604)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 08:18:41 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Mariusz Sikora (mariusz-sikora-at-amd)
<details>
<summary>Changes</summary>
…ySize
---
Full diff: https://github.com/llvm/llvm-project/pull/104604.diff
1 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp (+1-5)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index 0ca6266cc678b6..5b41a2cd731607 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -906,11 +906,7 @@ unsigned getWavefrontSize(const MCSubtargetInfo *STI) {
}
unsigned getLocalMemorySize(const MCSubtargetInfo *STI) {
- unsigned BytesPerCU = 0;
- if (STI->getFeatureBits().test(FeatureLocalMemorySize32768))
- BytesPerCU = 32768;
- if (STI->getFeatureBits().test(FeatureLocalMemorySize65536))
- BytesPerCU = 65536;
+ unsigned BytesPerCU = getAddressableLocalMemorySize(STI);
// "Per CU" really means "per whatever functional block the waves of a
// workgroup must share". So the effective local memory size is doubled in
``````````
</details>
https://github.com/llvm/llvm-project/pull/104604
More information about the llvm-commits
mailing list