[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 29 23:27:18 PST 2024


MaskRay wrote:

As I'm not a Windows developer, I defer to other reviewers' expertise on MSVC's PGO/LTO feature.

However, to be honest, I'm unsure about the value of porting the strings given the large feature differences between Clang and MSVC on PGO and LTO.
`clang -flto -c` output is LLVM bitcode files, which are distinguishable on their own.
With LLVM LTO, you can have 1 bitcode file and 99 object files, or 99 bitcode files and 1 object file.
I am not sure identifying that LTO happens is very useful.

There are many PGO flavors. If we add this, there could be some inconsistency everytime someone adds a new flavor of PGO and does not port this piece of code.


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


More information about the cfe-commits mailing list