[llvm] InstructionSelect: Use GISelChangeObserver instead of MachineFunction::Delegate (PR #105725)

Tobias Stadler via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 21:12:48 PDT 2024


https://github.com/tobias-stadler approved this pull request.

> Those changes are all done. I remember there was a conversation on discourse a few months back about clicking the resolve buttons but I'm not actually sure what the outcome was. I saw you were against the ban so I've resolved them

Thanks. You might have mistaken me for a different Tobias though, I am a relatively new contributor. No worries though. 

> Our downstream usage of the delegate is quite localized to a couple intrinsics so hopefully we can remove it. If we manage that I'll come back to revert this commit

I'd be fine with this either way. The ObserverWrapper issue needs to be fixed globally anyways, so I don't see a reason for you being blocked on this. I also think this is a valid usecase. I actually have a patch lying around for allowing reselection of generic instructions natively in InstructionSelect. I am investigating this because ideally I'd want to get rid of AArch64PostLegalizerLowering and Amara has also pointed out that this might be useful for simplifying preISelLower transformations in the AArch64InstructionSelector. I am just not happy enough with my approach yet for an RFC.

LGTM, but maybe give others a chance to chime in if this isn't urgent.

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


More information about the llvm-commits mailing list