[llvm] [AArch64][ARM] Move ARM-specific InstCombine transforms into `Transforms/Utils` (PR #169589)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 4 10:18:46 PST 2025
davemgreen wrote:
> @davemgreen Sorry for the late response, but I don't think just passing an IRBuilder will work. The multiply/AES passes use `replaceInstUsesWith` and `replaceOperand` in non-trivial ways.
>
> Is there an established pattern for just making these utilities header-only, and building them twice between ARM and AArch64? I could see it becoming an issue for compile time if more utilities are added, but if they grow to that point, they could just be moved back into their own module.
I was thinking that IC.replaceInstUsesWith could be ran in the caller, if the function returned a Value*. That wouldn't help with IC.replaceOperand - those might need to create a new Intrinsic to return. I'm not against a header file implementation, but I'm not against leaving it where it is too.
https://github.com/llvm/llvm-project/pull/169589
More information about the llvm-commits
mailing list