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

David Goldblatt via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 18:10:34 PDT 2024


davidtgoldblatt wrote:

> I don't see any code to actually check whether the wrapper will actually get inlined; is this just speculatively assuming that the wrapper is likely to get inlined in ThinLTO mode?

We [add an always-inline annotation](https://github.com/llvm/llvm-project/pull/87731/commits/ebfa8bbb884467da62b199d266a1fe7afd66fb1a#diff-6c262f2a29d2659ccf6671d6357f1942341277ff0a363ddb7814a641aabb12ebR526) to the wrapper, which practically seems to be enough in all the cases I checked (I'm not sure if we should regard this as a hard guarantee of thinlto post-thin-link optimizations or not; if not, I think making it mandatory should be doable if we need to, though).

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


More information about the llvm-commits mailing list