[llvm] [AMDGPU][SIInsertWaitcnts] Cleanup: Remove WaitEventMaskForInst member variable (PR #178030)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 28 09:07:53 PST 2026


================
@@ -3328,9 +3328,7 @@ bool SIInsertWaitcnts::run(MachineFunction &MF) {
   for (auto T : inst_counter_types())
     ForceEmitWaitcnt[T] = false;
 
-  WaitEventMaskForInst = WCG->getWaitEventMask();
-
-  SmemAccessCounter = eventCounter(WaitEventMaskForInst, SMEM_ACCESS);
+  SmemAccessCounter = eventCounter(WCG->getWaitEventMask(), SMEM_ACCESS);
----------------
vporpo wrote:

WCG->getWaitVentMask() is accessing the mask straight from its owner, but this->getWaitEventMask() is one extra layer on top of it. It's not a performance concern, it's more about getting the data directly from the place that owns it, since we have direct access to it.


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


More information about the llvm-commits mailing list