From 639a0afa9955a8613902e46e168767bc05c46cdd Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 25 Sep 2024 12:34:43 -0700 Subject: 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 --- llvm/lib/CodeGen/BasicBlockSections.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/CodeGen/BasicBlockSections.cpp') diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp index 1eedfc4..0071284 100644 --- a/llvm/lib/CodeGen/BasicBlockSections.cpp +++ b/llvm/lib/CodeGen/BasicBlockSections.cpp @@ -311,6 +311,11 @@ bool BasicBlockSections::handleBBSections(MachineFunction &MF) { // original layout positions and finding the original fallthroughs. MF.RenumberBlocks(); + if (BBSectionsType == BasicBlockSection::Labels) { + MF.setBBSectionsType(BBSectionsType); + return true; + } + DenseMap FuncClusterInfo; if (BBSectionsType == BasicBlockSection::List) { auto [HasProfile, ClusterInfo] = @@ -377,6 +382,8 @@ bool BasicBlockSections::handleBBSections(MachineFunction &MF) { // avoids the need to store basic block IDs in the BB address map section, since // they can be determined implicitly. bool BasicBlockSections::handleBBAddrMap(MachineFunction &MF) { + if (MF.getTarget().getBBSectionsType() == BasicBlockSection::Labels) + return false; if (!MF.getTarget().Options.BBAddrMap) return false; MF.RenumberBlocks(); -- cgit v1.1