aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BasicBlockSections.cpp
diff options
context:
space:
mode:
authorRahman Lavaee <rahmanl@google.com>2024-09-25 22:03:10 -0700
committerGitHub <noreply@github.com>2024-09-25 22:03:10 -0700
commit7b7747dc1d3da1a829503ea9505b4cecce4f5bda (patch)
tree812813a4212672361008fd25b1064303781056b1 /llvm/lib/CodeGen/BasicBlockSections.cpp
parent0f984976897857a8f4003063be6fa38a733fa624 (diff)
downloadllvm-7b7747dc1d3da1a829503ea9505b4cecce4f5bda.zip
llvm-7b7747dc1d3da1a829503ea9505b4cecce4f5bda.tar.gz
llvm-7b7747dc1d3da1a829503ea9505b4cecce4f5bda.tar.bz2
Reapply "Deprecate the `-fbasic-block-sections=labels` option." (#110039)
This reapplies commit 1911a50fae8a441b445eb835b98950710d28fc88 with a minor fix in lld/ELF/LTO.cpp which sets Options.BBAddrMap when `--lto-basic-block-sections=labels` is passed.
Diffstat (limited to 'llvm/lib/CodeGen/BasicBlockSections.cpp')
-rw-r--r--llvm/lib/CodeGen/BasicBlockSections.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp
index 0071284..1eedfc4 100644
--- a/llvm/lib/CodeGen/BasicBlockSections.cpp
+++ b/llvm/lib/CodeGen/BasicBlockSections.cpp
@@ -311,11 +311,6 @@ 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<UniqueBBID, BBClusterInfo> FuncClusterInfo;
if (BBSectionsType == BasicBlockSection::List) {
auto [HasProfile, ClusterInfo] =
@@ -382,8 +377,6 @@ 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();