[llvm] [AMDGPU] Cleanup: Use unique_ptr for WCG and remove unnecessary class members (PR #177689)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 09:08:59 PST 2026


jayfoad wrote:

FYI the original motivation (not necessarily a _good_ motivation) was to avoid dynamic memory allocation where it's not required. We also explored other options like declaring WCG as something like:
```
  std::variant<WaitcntGeneratorPreGFX12, WaitcntGeneratorGFX12Plus> WCG;
```

I think your patch has the advantage that the waitcnt generator classes no longer need a default constructor. Can you do some more cleanup based on that?

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


More information about the llvm-commits mailing list