aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-09-25 12:34:43 -0700
committerKazu Hirata <kazu@google.com>2024-09-25 12:34:43 -0700
commit639a0afa9955a8613902e46e168767bc05c46cdd (patch)
tree6019e52986dad7fa3b6440574413ab42db1df05d /llvm/lib/CodeGen/MachineFunction.cpp
parent1911a50fae8a441b445eb835b98950710d28fc88 (diff)
downloadllvm-639a0afa9955a8613902e46e168767bc05c46cdd.zip
llvm-639a0afa9955a8613902e46e168767bc05c46cdd.tar.gz
llvm-639a0afa9955a8613902e46e168767bc05c46cdd.tar.bz2
Revert "Deprecate the `-fbasic-block-sections=labels` option. (#107494)"
This reverts commit 1911a50fae8a441b445eb835b98950710d28fc88. Several bots are failing: https://lab.llvm.org/buildbot/#/builders/190/builds/6519 https://lab.llvm.org/buildbot/#/builders/3/builds/5248 https://lab.llvm.org/buildbot/#/builders/18/builds/4463
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index b56888a..ab45663 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -465,9 +465,11 @@ MachineFunction::CreateMachineBasicBlock(const BasicBlock *BB,
MachineBasicBlock *MBB =
new (BasicBlockRecycler.Allocate<MachineBasicBlock>(Allocator))
MachineBasicBlock(*this, BB);
- // Set BBID for `-basic-block-sections=list` and `-basic-block-address-map` to
- // allow robust mapping of profiles to basic blocks.
- if (Target.Options.BBAddrMap ||
+ // 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.Options.BBAddrMap ||
Target.getBBSectionsType() == BasicBlockSection::List)
MBB->setBBID(BBID.has_value() ? *BBID : UniqueBBID{NextBBID++, 0});
return MBB;