[PATCH] D28416: [PGO] Turn off comdat renaming in IR PGO by default
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 16:21:11 PST 2017
davidxl added a comment.
needs a profile use test case such that a comdat function has multiple copies of profile data and the profile annotator can find the one with the matching hash.
================
Comment at: include/llvm/ProfileData/InstrProf.h:237
+
+/// Check if we can safely rename this Comdat function.
+bool canRenameComdatInIRPGO(const Function &F);
----------------
Add comments: instances of the same comdat function may have different control flows thus can not share the same counter variable.
================
Comment at: include/llvm/ProfileData/InstrProf.h:238
+/// Check if we can safely rename this Comdat function.
+bool canRenameComdatInIRPGO(const Function &F);
+
----------------
canRenameComdatFunc
================
Comment at: lib/Transforms/Instrumentation/InstrProfiling.cpp:35
+cl::opt<bool> DoInstrprofVarHashpostfix(
+ "instrprof-var-hashpostfix",
----------------
-> DoHashBasedCounterSplit
================
Comment at: lib/Transforms/Instrumentation/InstrProfiling.cpp:37
+ "instrprof-var-hashpostfix",
+ cl::desc("Append hash to the instrprof variables"), cl::init(true));
+
----------------
"Rename counter variable of a comdat function based on cfg hash".
https://reviews.llvm.org/D28416
More information about the llvm-commits
mailing list