[PATCH] D79221: Descriptive symbol names for machine basic block sections
Sriraman Tallam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 21:53:26 PDT 2020
tmsriram added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineBasicBlock.cpp:87
+ if (SectionID == MBBSectionID::ColdSectionID) {
+ Suffix += ".cold";
+ } else if (SectionID == MBBSectionID::ExceptionSectionID) {
----------------
Just a comment: I like this because it will demangle as expected and works well with existing symbolizers, profilers and debuggers out of the box.
$ c++filt _Z3foov.cold
foo() [clone .cold]
$ c++filt _Z3foov.eh
foo() [clone .eh]
$c++filt _Z3foov.1234
foo() [clone 1234]
================
Comment at: llvm/lib/CodeGen/MachineBasicBlock.cpp:93
+ }
+ CachedMCSymbol = Ctx.getOrCreateSymbol(getParent()->getName() + Suffix);
} else {
----------------
getParent() is just MF, so MF->getName()
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79221/new/
https://reviews.llvm.org/D79221
More information about the llvm-commits
mailing list