From 1911a50fae8a441b445eb835b98950710d28fc88 Mon Sep 17 00:00:00 2001 From: Rahman Lavaee Date: Wed, 25 Sep 2024 12:03:38 -0700 Subject: Deprecate the `-fbasic-block-sections=labels` option. (#107494) This feature is supported via the newer option `-fbasic-block-address-map`. Using the old option still works by delegating to the newer option, while a warning is printed to show deprecation. --- llvm/lib/CodeGen/MachineFunction.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') 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(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; -- cgit v1.1