[PATCH] D17020: [PGO] Revisied patch: Differentiate Clang instrumentation and IR level instrumentation profiles

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 10:33:57 PST 2016


davidxl added inline comments.

================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:729
@@ +728,3 @@
+  if (TT.isOSBinFormatMachO())
+    IRLevelVersionVariable->setLinkage(GlobalValue::LinkOnceAnyLinkage);
+  else
----------------
Why not linkonceODR -- the version var generated in each TU needs to be the same. 

================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:733
@@ +732,3 @@
+        M.getOrInsertComdat(StringRef(INSTR_PROF_QUOTE(IR_LEVEL_PROF_VERSION_VAR))));
+/*  IRLevelVersionVariable->setLinkage(GlobalValue::WeakAnyLinkage); */
+}
----------------
Remove this comment line.


http://reviews.llvm.org/D17020





More information about the llvm-commits mailing list