[llvm] [AMDGPU][SIInsertWaitcnts][NFC] Drop MaxCounter member variable (PR #181092)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 17 00:47:35 PST 2026


================
@@ -479,11 +487,9 @@ class WaitcntGeneratorGFX12Plus final : public WaitcntGenerator {
 
 public:
   WaitcntGeneratorGFX12Plus() = delete;
-  WaitcntGeneratorGFX12Plus(const MachineFunction &MF,
-                            InstCounterType MaxCounter,
-                            const AMDGPU::HardwareLimits *Limits,
-                            bool IsExpertMode)
-      : WaitcntGenerator(MF, MaxCounter, Limits), IsExpertMode(IsExpertMode) {}
+  WaitcntGeneratorGFX12Plus(const MachineFunction &MF, const bool &IsExpertMode,
----------------
ssahasra wrote:

I don't understand this redeclaration of `IsExpertMode` as a reference. What does it achieve? As far as I can see, a simple boolean function argument now got replaced by a pointer. If this is meant to "save" copying, then I am totally and loudly opposed to this change and it should not be allowed. 

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


More information about the llvm-commits mailing list