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

Robert Imschweiler via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 05:30:44 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;
+}
----------------
ro-i wrote:

Since the variables represent state that is re-used for multiple instances of `MFMASmallGemmSingleWaveOpt`, I experimented a little with adding a state object which lives as a shared_ptr in `GCNTargetMachine`/`GCN(Post)ScheduleDAGMILive`. Do you think that it's worth pursuing this or should I just opt for static member variables as it's already done in `MFMAExpInterleaveOpt`, for example?

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


More information about the llvm-commits mailing list