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

Jiří Filek via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 11:58:14 PDT 2026


fileho wrote:

Hi @nikic @aeubanks, I have moved the forwarding to inliner. It seems to catch all cases as the InlineCost version and should be strictly better. Could you please check the changes if it is what you meant?

I am not sure how to handle the scan limit. `DefMaxInstsToScan` misses several beneficial cases including the motivating `std::set`. I have added new parameter with default 16. It looked like a reasonable value when I was looking into IR for patterns where store-to-load helps. However, I don't have a good justification for the exact value

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


More information about the llvm-commits mailing list