diff options
author | Rahman Lavaee <rahmanl@google.com> | 2024-09-25 22:03:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-25 22:03:10 -0700 |
commit | 7b7747dc1d3da1a829503ea9505b4cecce4f5bda (patch) | |
tree | 812813a4212672361008fd25b1064303781056b1 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 0f984976897857a8f4003063be6fa38a733fa624 (diff) | |
download | llvm-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/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index ab45663..b56888a 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -465,11 +465,9 @@ 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.Options.BBAddrMap || + // 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 || Target.getBBSectionsType() == BasicBlockSection::List) MBB->setBBID(BBID.has_value() ? *BBID : UniqueBBID{NextBBID++, 0}); return MBB; |