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

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 10:19:48 PDT 2023


ellis added inline comments.


================
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>.
----------------
davidxl wrote:
> ellis wrote:
> > davidxl wrote:
> > > is it better to use '>' to indicate context:
> > > 
> > > foo.c > bar
> > > 
> > > or <foo.c> bar
> > I don't think `>` would work well because objc_direct methods have `<>` symbols: `-<C foo:>`. I thought `;` worked well because I don't know of any name mangling that uses it.
> ok. Note the <> is used in the unknown case.
Yep! `<unknown>;_blah` is a possible case, which is why we still need the `;` in between the two. I can't imagine `;` in a filepath, and I don't know of a case where `;` is in a mangled name.


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