[PATCH] D22600: [PGO] Fix profile mismatch in Comdat function with pre-inliner

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 11:38:25 PDT 2016


davidxl added inline comments.

================
Comment at: lib/ProfileData/InstrProf.cpp:784
@@ -782,1 +783,3 @@
 
+bool needsComdatForCounter(const Function &F, const Module &M) {
+  if (F.hasComdat())
----------------
Please separate the restructuring into a NFC patch

================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:120
@@ +119,3 @@
+// function. This is to avoid the hash mismatch caused by the preinliner.
+static cl::opt<bool> ComdatAppendHash(
+    "comdat-append-hash", cl::init(true), cl::Hidden,
----------------
Change the name to "DoComdatRenaming"


https://reviews.llvm.org/D22600





More information about the llvm-commits mailing list