[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #68932)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 9 04:52:41 PST 2023


================
@@ -1809,6 +1816,23 @@ bool SIInsertWaitcnts::shouldFlushVmCnt(MachineLoop *ML,
   return HasVMemLoad && UsesVgprLoadedOutside;
 }
 
+bool SIInsertWaitcnts::insertWaitcntAfterMemOp(MachineFunction &MF) {
+  bool Modified = false;
+
+  for (auto &MBB : MF) {
----------------
arsenm wrote:

I think it makes it harder to reason about the pass as a whole to have it as a totally separate phase

https://github.com/llvm/llvm-project/pull/68932


More information about the cfe-commits mailing list