[llvm] [AMDGPU] Simplify state clearing in SIInsertWaitcnts. NFC. (PR #186399)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 01:34:33 PDT 2026


https://github.com/ssahasra approved this pull request.

> There is no need to clear state at the start or end of the run method, because a fresh instance of SIInsertWaitcnts is constructed for each run on a MachineFunction.

I am not experienced at designing passes, but I would naturally gravitate towards such a design. Perhaps we should leave a comment where `run()` is invoked, noting how a new instance is being created on the fly. This should help slow down the next enthusiastic refactoring of the same design.

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


More information about the llvm-commits mailing list