Extend BasicBlock sections to allow specifying clusters of basic blocks
authorRahman Lavaee <rahmanl@google.com>
Mon, 13 Apr 2020 18:39:23 +0000 (11:39 -0700)
committerRahman Lavaee <rahmanl@google.com>
Mon, 13 Apr 2020 18:46:11 +0000 (11:46 -0700)
commit0d4ec16d3db3a92514e14101f635e8536c208c4f
tree1fff57189fd9a875ff3b2023035a26a2287eb11a
parentec228d722c08847c2b5bb12a99191d77df3374af
Extend BasicBlock sections to allow specifying clusters of basic blocks
in the same section.

This allows specifying BasicBlock clusters like the following example:
!foo
!!0 1 2
!!4
This places basic blocks 0, 1, and 2 in one section in this order, and
places basic block #4 in a single section of its own.
22 files changed:
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/CodeGen/MachineBasicBlock.h
llvm/include/llvm/CodeGen/MachineFunction.h
llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
llvm/include/llvm/Target/TargetLoweringObjectFile.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/BBSectionsPrepare.cpp
llvm/lib/CodeGen/MIRParser/MIParser.cpp
llvm/lib/CodeGen/MIRParser/MIRParser.cpp
llvm/lib/CodeGen/MIRPrinter.cpp
llvm/lib/CodeGen/MachineBasicBlock.cpp
llvm/lib/CodeGen/MachineFunction.cpp
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/Target/TargetLoweringObjectFile.cpp
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-mir-print.ll
llvm/test/CodeGen/X86/basicblock-sections.ll