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

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 12:20:37 PDT 2024


efriedma-quic wrote:

> My strong suspicion is that ThinLTO-visible -> ThinLTO-visible calls execute much more often than non-ThinLTO-visible -> ThinLTO-visible ones and so this is a good tradeoff for almost all programs.

This is probably right... but it's still a heuristic.

> I think even at ThinLTO link time, you don't necessarily know the answer, right? 

If the symbol isn't exported (has hidden visibility, or is built into an executable with normal settings), you can compute a precise answer.  If the symbol is exported, you can't tell how it will be used, sure.

> Also just pragmatically: rewriting functions serially at thin-link time seems like a pretty heavy cost to pay

There's a lot of interesting stuff you can do with global transforms at thin-link time which hasn't really been explored... I don't think it makes sense to completely rule out such transforms.  Maybe this isn't the best example, though.

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


More information about the llvm-commits mailing list