[PATCH] D124246: [AMDGPU] Adjust wave priority based on VMEM instructions to avoid duty-cycling.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 02:35:12 PDT 2022
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp:95
+ return false;
+
+ const GCNSubtarget &ST = MF.getSubtarget<GCNSubtarget>();
----------------
I think it only makes sense to run this pass on kernels (i.e. the entry point of a wave), not on subfunctions, so you should bail out if `!AMDGPU::isKernel(MF.getFunction().getCallingConv())` or similar.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp:131
+ if (MBBInfos[&MBB].MayReachVMEMLoad) {
+ if (MBB.isReturnBlock())
+ PriorityLoweringBlocks.insert(&MBB);
----------------
I could be wrong but I don't think kernels have a normal "return" at the end. Maybe change this to `MBB.succ_empty()` to make it a bit more generic?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124246/new/
https://reviews.llvm.org/D124246
More information about the llvm-commits
mailing list