[llvm] [AMDGPU] Rename LocalMemorySize features to AddressableLocalMemorySize (PR #110242)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 04:00:40 PDT 2024
================
@@ -143,11 +143,10 @@ GCNSubtarget &GCNSubtarget::initializeSubtargetDependencies(const Triple &TT,
if (LDSBankCount == 0)
LDSBankCount = 32;
- if (TT.getArch() == Triple::amdgcn && LocalMemorySize == 0)
- LocalMemorySize = 32768;
-
- AddressableLocalMemorySize = LocalMemorySize;
+ if (TT.getArch() == Triple::amdgcn && AddressableLocalMemorySize == 0)
+ AddressableLocalMemorySize = 32768;
+ LocalMemorySize = AddressableLocalMemorySize;
if (AMDGPU::isGFX10Plus(*this) &&
!getFeatureBits().test(AMDGPU::FeatureCuMode))
LocalMemorySize *= 2;
----------------
jayfoad wrote:
This was part of the motivation: previously, `LocalMemorySize` was initialized from the target features but then modified here, which seems unclean. Now `AddressableLocalMemorySize` is initialized from the target features and never changed; `LocalMemorySize` is derived from it.
https://github.com/llvm/llvm-project/pull/110242
More information about the llvm-commits
mailing list