Skip to content

[AMDGPU][NFC] Remove duplicate code by using getAddressableLocalMemor… #104604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading