aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorRahman Lavaee <rahmanl@google.com>2022-12-13 09:52:05 -0800
committerRahman Lavaee <rahmanl@google.com>2022-12-13 11:13:57 -0800
commit96b6ee1bdc11eeea9d202a14d5975aac992f4176 (patch)
tree70baaf0d20fa557b2b68850331bf7b6f43192049 /llvm/lib/CodeGen/MachineFunction.cpp
parentf54497f114b9b5acaa8ebff296594b2cd7e437dd (diff)
downloadllvm-96b6ee1bdc11eeea9d202a14d5975aac992f4176.zip
llvm-96b6ee1bdc11eeea9d202a14d5975aac992f4176.tar.gz
llvm-96b6ee1bdc11eeea9d202a14d5975aac992f4176.tar.bz2
Revert "[Propeller] Use Fixed MBB ID instead of volatile MachineBasicBlock::Number."
This reverts commit 6015a045d768feab3bae9ad9c0c81e118df8b04a. Differential Revision: https://reviews.llvm.org/D139952
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 9defe36..78b49c9 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -437,16 +437,8 @@ void MachineFunction::deleteMachineInstr(MachineInstr *MI) {
/// `new MachineBasicBlock'.
MachineBasicBlock *
MachineFunction::CreateMachineBasicBlock(const BasicBlock *bb) {
- MachineBasicBlock *MBB =
- new (BasicBlockRecycler.Allocate<MachineBasicBlock>(Allocator))
- MachineBasicBlock(*this, bb);
- // Set BBID for `-basic-block=sections=labels` and
- // `-basic-block-sections=list` to allow robust mapping of profiles to basic
- // blocks.
- if (Target.getBBSectionsType() == BasicBlockSection::Labels ||
- Target.getBBSectionsType() == BasicBlockSection::List)
- MBB->setBBID(NextBBID++);
- return MBB;
+ return new (BasicBlockRecycler.Allocate<MachineBasicBlock>(Allocator))
+ MachineBasicBlock(*this, bb);
}
/// Delete the given MachineBasicBlock.