[llvm] RFC: Argpromotion of externally visible functions (PR #87731)

David Goldblatt via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 10:52:32 PDT 2024


davidtgoldblatt wrote:

> I like the general idea, but I'm also somewhat concerned about this being too aggressive in promoting functions that have external callers. As I understand it, the cases where you would want this optimization to apply are cases where a function _could_ be internalized (and would be internalized in full LTO), but isn't internalized due to use in multiple ThinLTO modules.

Right -- practically where this has the most effect is in stuff like the C++ template use case, where you end up getting lots of linkonce_odr functions (std:: functions, utility libraries, etc.) sprayed into ~every module, with the definition that wins being fairly random.

> I guess if the performance numbers say this is fine in practice, then we can just do it and see what falls out, though I'd definitely want to see numbers for Rust in that case (which, I think, is even heavier on argpromo than C++).

Can do -- is there some particular benchmark you'd like to see?

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


More information about the llvm-commits mailing list