[PATCH] D156569: [InstrProf] Encode linkage names in IRPGO counter names

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 16:47:36 PDT 2023


davidxl added inline comments.


================
Comment at: llvm/lib/ProfileData/InstrProf.cpp:269
+// The PGO name has the format [<filepath>;]<linkage-name> where <filepath>; is
+// provided if linkage and local and <linkage-name> is the mangled function
+// name. The filepath is used to discriminate possibly identical function names.
----------------
and --> is



================
Comment at: llvm/lib/ProfileData/InstrProf.cpp:271
+// name. The filepath is used to discriminate possibly identical function names.
+// ; is used because it is unlikely to be found in either <filepath> or
+// <linkage-name>.
----------------
is it better to use '>' to indicate context:

foo.c > bar

or <foo.c> bar


================
Comment at: llvm/lib/ProfileData/InstrProf.cpp:295
+// See getPGOFuncName() for details
+std::string getIRPGOFuncName(const Function &F, bool InLTO) {
+  if (!InLTO) {
----------------
Consider sharing code with the legacy version. They are almost identical.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156569



More information about the llvm-commits mailing list