[PATCH] D107034: [LTO][CSPGO] Set EnableValueProfiling flag for CSPGO when running with mixed-LTO mode

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 12 10:45:43 PDT 2021


rnk added inline comments.


================
Comment at: llvm/lib/LTO/LTO.cpp:1236
+      if (isIRPGOFlagSet(&M))
+        M.addModuleFlag(llvm::Module::Warning, "EnableValueProfiling", 1);
+
----------------
My only concern is that we have to do this in two places. Is there a better place we can do this? Maybe the frontend, or wherever we enable IR PGO? These feel like the wrong places.


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