[llvm] [AMDGPU] IGLP: Fixes for VMEM load detection and unsigned int handling (PR #135090)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 12 03:48:24 PDT 2025


================
@@ -2079,6 +2083,9 @@ class MFMASmallGemmSingleWaveOpt final : public IGLPStrategy {
 static unsigned DSWCount = 0;
 static unsigned DSWWithPermCount = 0;
 static unsigned DSWWithSharedVMEMCount = 0;
+static void resetDSWCounters() {
+  DSWCount = DSWWithPermCount = DSWWithSharedVMEMCount = 0;
+}
----------------
arsenm wrote:

> because the original authors actually wanted to maintain state.

And doing it like this is completely invalid. This needs to be per-function state at most. Also note that the SIMachineFunctionInfo is definitely not the correct place to put this either, since this is still information that only needs to be local to the pass.



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


More information about the llvm-commits mailing list