[PATCH] D138476: [AMDGPU][InsertWaits] No wait for WAW for global/scratch_load
Ruiling, Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 04:03:34 PST 2022
ruiling added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:144
+static bool accessVMEMOnly(const MachineInstr &Inst) {
+ return SIInstrInfo::isVMEM(Inst) || SIInstrInfo::isFLATGlobal(Inst) ||
----------------
foad wrote:
> I guess this is OK but it I really don't know what we mean by "VMEM" any more.
Do you feel it better to be `updateVMCntOnly()`?
================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:151
+ assert(accessVMEMOnly(Inst));
+ if (!SIInstrInfo::isMIMG(Inst) || SIInstrInfo::isFLATGlobal(Inst) ||
+ SIInstrInfo::isFLATScratch(Inst))
----------------
foad wrote:
> I don't think you need to change this line. Global and scratch will already fail the isMIMG test.
Yes, I did not realize it. Thanks!
================
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,
----------------
foad wrote:
> Don't need the outer parentheses here.
will fix.
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