[llvm-branch-commits] [llvm] [PGO] Generate __llvm_profile_raw_version only when instrumented (PR #93917)
Pavel Samolysov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri May 31 09:41:57 PDT 2024
samolisov wrote:
@aeubanks my intent is to get no `__llvm_profile_raw_version` in modules where nothing was actually instrumented. Usually, in my cases, they are the modules for regular-LTO part in thin-LTO where split LTO Units are enabled. This is a good point about consistency and using the variable as a flag that a module had already been instrumented but when a split LTO unit contains the variable in both parts it makes problems for the linker: I know how to distinguish one module from another and change the linkage for the variable but I have no idea how to deal with two parts of the same module. May be this solution looks as a hack but I think it makes sense: nothing was instrumented and nothing makes a reason for the version variable to present. But I'm unfamiliar about details of the profile runtime library, if the absence of the version variable makes troubles it is a reason to preserve it. But actually I tried to link such modules, without the variable, and get some profile.
https://github.com/llvm/llvm-project/pull/93917
More information about the llvm-branch-commits
mailing list