[llvm] [AMDGPU][NPM] Add isRequired to passes missing it (PR #134033)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 10 13:53:12 PDT 2025


aeubanks wrote:

> > > I think we should revisit this API. Wrong by default is a bad pattern. Passes should be required by default
> > 
> > 
> > There is in fact a lingering suggestion that we replace `PassInfoMixin` with `OptionalPassMixin` and `RequiredPassMixin` to avoid these kinds of slips and force passes to explicitly choose between the two. I remember @paperchalice working on that a while ago but I can pick that up too. @aeubanks I suppose it was your suggestion?
> 
> I want something like pass traits but seems that it conflicts with the type erasure style in current implementation...

doesn't something like https://github.com/aeubanks/llvm-project/commit/2ac577e500a3b8cc77c18ac529cba57efcaf3ab7 work? if that works, do you want to send an RFC to do push this through?

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


More information about the llvm-commits mailing list