[PATCH] D78742: Use .text.unlikely prefix for cold MachineBasicBlock sections.

Sriraman Tallam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 14:08:03 PDT 2020


tmsriram added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:870
+  if (MBB.getSectionID() == MBBSectionID::ColdSectionID) {
+    Name += ".text.unlikely.";
+    Name += MBB.getParent()->getName();
----------------
This looks good.  This should also be done for ".eh", .text.eh must be the prefix.  Further,  the parent name must only be appended for unlikely and eh sections as there is only one such section for each function and using the function name guarantees that.

For other sections, there is no need to append the parent name.  Either it should be .text (or .text.hot) or .text.<MBBSymbolName> when UniqueBBSectionNames is used.  Does this make sense?  Thanks for working on this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78742





More information about the llvm-commits mailing list