[PATCH] D79221: Descriptive symbol names for machine basic block sections

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 17:38:39 PDT 2020


snehasish created this revision.
snehasish added a reviewer: tmsriram.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Today symbol names generated for machine basic block sections use a unary encoding to reduce bloat. This is essential when every basic block in the binary is assigned a symbol however with basic block clusters (rG05192e585ce175b55f2a26b83b4ed7882785c8e6 <https://reviews.llvm.org/rG05192e585ce175b55f2a26b83b4ed7882785c8e6>) when we only need to generate a few non-temporary symbols we can assign more descriptive names making them more user friendly. With this change -

- Cold cluster section for function foo is named "foo.cold"
- Exception cluster section for function foo is named "foo.eh"
- Other cluster sections identified by their ids are named "foo.ID"

Tests for basicblock-sections are updated with some cleanup where appropriate.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79221

Files:
  llvm/lib/CodeGen/MachineBasicBlock.cpp
  llvm/test/CodeGen/X86/basicblock-sections-clusters-branches.ll
  llvm/test/CodeGen/X86/basicblock-sections-clusters-eh.ll
  llvm/test/CodeGen/X86/basicblock-sections-clusters.ll
  llvm/test/CodeGen/X86/basicblock-sections-cold.ll
  llvm/test/CodeGen/X86/basicblock-sections-directjumps.ll
  llvm/test/CodeGen/X86/basicblock-sections-eh.ll
  llvm/test/CodeGen/X86/basicblock-sections-list.ll
  llvm/test/CodeGen/X86/basicblock-sections-listbb.ll
  llvm/test/CodeGen/X86/basicblock-sections-mir-parse.mir
  llvm/test/CodeGen/X86/basicblock-sections.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79221.261396.patch
Type: text/x-patch
Size: 17394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200501/37471a53/attachment-0001.bin>


More information about the llvm-commits mailing list