[PATCH] D138476: [AMDGPU][InsertWaits] No wait for WAW for global/scratch_load
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 02:41:01 PST 2022
foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.
LGTM. @nhaehnle already explained offline that the basic idea is sound.
================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:144
+static bool accessVMEMOnly(const MachineInstr &Inst) {
+ return SIInstrInfo::isVMEM(Inst) || SIInstrInfo::isFLATGlobal(Inst) ||
----------------
I guess this is OK but it I really don't know what we mean by "VMEM" any more.
================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:151
+ assert(accessVMEMOnly(Inst));
+ if (!SIInstrInfo::isMIMG(Inst) || SIInstrInfo::isFLATGlobal(Inst) ||
+ SIInstrInfo::isFLATScratch(Inst))
----------------
I don't think you need to change this line. Global and scratch will already fail the isMIMG test.
================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1187
// results in order anyway.
- if (Op.isUse() || !SIInstrInfo::isVMEM(MI) ||
+ if (Op.isUse() || !(accessVMEMOnly(MI)) ||
ScoreBrackets.hasOtherPendingVmemTypes(RegNo,
----------------
Don't need the outer parentheses here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138476/new/
https://reviews.llvm.org/D138476
More information about the llvm-commits
mailing list