[llvm] Use thinlto and pgo for x86_64 windows release packaging (PR #71067)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 02:43:19 PST 2023


mstorsjo wrote:

> > how portable is the profile information across builds?
> 
> It _can_ work across targets, but e.g. if the function names from the profile and the current build don't match because of mangling, those functions will not benefit from the profile info.

Ah, thanks! That makes sense.

So between Linux and MinGW x86_64, arm and aarch64, it should mostly match. (I guess that the exception is for cases where types are defined differently, and those types are visible in function signatures.) Cases where functions take C++ standard library types probably won't match. Linux and MSVC builds probably wouldn't match at all as the C++ symbol name mangling is different.

One interesting case is where the mangling mostly matches but one case has an extra symbol prefix while the other one doesn't - like Windows/i386, and macOS on all architectures. It would be neat if it would be possible to apply a transformation on the profile information, to add/remove such a prefix, to make it match the other target better. CC @ZequanWu - how feasible would this be?

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


More information about the llvm-commits mailing list