[llvm] [InlineCost] Use store-to-load forwarding to resolve call arguments (PR #190607)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 14:06:01 PDT 2026


aeubanks wrote:

> > IIUC the problem is that we don't simplify the caller between inlining attempts? imo a slightly better version of this is to actually attempt to do the store/load forwarding in the caller after inlining if the alternative is to unconditionally try store/load forwarding in the inline cost analysis anyway.
> 
> You mean do store/load forwarding as part of the pruning function cloner?

not in the pruning function cloner, but lazily when visiting a call site. i.e. when we visit a call site to consider for inlining, check if any arguments are loads and attempt store/load forwarding, then continue with inline cost analysis. we could try to eagerly do simplifications in the caller after inlining, but that's probably much more involved to do so in a way to keep compile times reasonable

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


More information about the llvm-commits mailing list