[PATCH] D87813: [llvm] Add -bbsections-cold-text-prefix to emit cold clusters to a different section.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 14:58:28 PDT 2020


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/lib/CodeGen/BasicBlockSections.cpp:82
 
+// Placing the cold clusters in a separate section mitigates against poor
+// profiles and allows optimizations such as hugepage mapping to be applied at a
----------------
I know your intention is that in practice users should specify .text.split. , however, the comment is a bit unclear that normally users should not use .text.unlikely.


================
Comment at: llvm/test/CodeGen/X86/basic-block-sections-cold.ll:40
+; LINUX-SPLIT-NEXT: _Z3bazb.cold:
+; LINUX-SPLIT-NEXT: callq _Z3barv
+; LINUX-SPLIT:      .LBB0_2:
----------------
I usually indent instructions to emphasize that they are in the region covered by a label (like `_Z3bazb.cold:`)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87813



More information about the llvm-commits mailing list