[PATCH] D92483: AMDGPU - Use MUBUF instructions for global address space access
Tony Tye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 23 10:04:53 PST 2020
t-tye added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp:93
if (isAmdHsaOS()) // Turn on FlatForGlobal for HSA.
FullFS += "+flat-for-global,+unaligned-access-mode,+trap-handler,";
----------------
Seems +flat-for-global should not be added if SI. Suggest pulling up later logic to here and combine.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp:115-116
+ if (Gen == AMDGPUSubtarget::INVALID) {
+ Gen = TT.getOS() == Triple::AMDHSA ? AMDGPUSubtarget::SEA_ISLANDS
+ : AMDGPUSubtarget::SOUTHERN_ISLANDS;
+ }
----------------
Should we consider using AMDGPUSubtarget::SEA_ISLANDS as the "generic" processor for all OSs? That can be a separate patch.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp:125-132
if (!hasAddr64() && !FS.contains("flat-for-global")) {
FlatForGlobal = true;
}
+ // Use MUBUF instructions for global address space access in GFX60x
+ if (getGeneration() == AMDGPUSubtarget::SOUTHERN_ISLANDS) {
+ FlatForGlobal = false;
----------------
Would seem better to combine these? Perhaps move this up to be adjacent or combined with code above that sets flat-for-global.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92483/new/
https://reviews.llvm.org/D92483
More information about the llvm-commits
mailing list