[PATCH] D107034: [CSPGO] Set EnableValueProfiling flag for CSPGO to avoid IRPGO value loss in LTO

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 13 13:48:33 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/lib/ProfileData/InstrProf.cpp:1148
+
+    // The IRPGO flag var (__llvm_profile_raw_version) has external linkage,
+    // it may not be kept if it's non-prevailing in a mixed-LTO mode (both
----------------
The way `comdat any` is used, it is unsupported if you mix non-CS and CS PGO object files. The first copy is picked by the linker.

This does not seem a proper fix to me. If you can give a concrete example, if may help me to understand.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107034/new/

https://reviews.llvm.org/D107034



More information about the llvm-commits mailing list