Skip to content

Commit 716f5da

Browse files
committed
Deprecate the -fbasic-block-sections=labels option.
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 generated to show deprecation.
1 parent d7dd2c4 commit 716f5da

22 files changed

+48
-74
lines changed

clang/docs/UsersManual.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,14 +2369,16 @@ are listed below.
23692369
$ cd $P/bar && clang -c -funique-internal-linkage-names name_conflict.c
23702370
$ cd $P && clang foo/name_conflict.o && bar/name_conflict.o
23712371
2372-
.. option:: -fbasic-block-sections=[labels, all, list=<arg>, none]
2372+
.. option:: -f[no]-basic-block-address-map:
2373+
Emits a ``SHT_LLVM_BB_ADDR_MAP`` which includes address offsets for each
2374+
basic block in the program, relative to the parent function address.
2375+
2376+
2377+
.. option:: -fbasic-block-sections=[all, list=<arg>, none]
23732378

23742379
Controls how Clang emits text sections for basic blocks. With values ``all``
23752380
and ``list=<arg>``, each basic block or a subset of basic blocks can be placed
2376-
in its own unique section. With the "labels" value, normal text sections are
2377-
emitted, but a ``.bb_addr_map`` section is emitted which includes address
2378-
offsets for each basic block in the program, relative to the parent function
2379-
address.
2381+
in its own unique section.
23802382

23812383
With the ``list=<arg>`` option, a file containing the subset of basic blocks
23822384
that need to placed in unique sections can be specified. The format of the

clang/include/clang/Basic/CodeGenOptions.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,13 @@ class CodeGenOptions : public CodeGenOptionsBase {
107107

108108
// This field stores one of the allowed values for the option
109109
// -fbasic-block-sections=. The allowed values with this option are:
110-
// {"labels", "all", "list=<file>", "none"}.
110+
// {"all", "list=<file>", "none"}.
111111
//
112-
// "labels": Only generate basic block symbols (labels) for all basic
113-
// blocks, do not generate unique sections for basic blocks.
114-
// Use the machine basic block id in the symbol name to
115-
// associate profile info from virtual address to machine
116-
// basic block.
117112
// "all" : Generate basic block sections for all basic blocks.
118113
// "list=<file>": Generate basic block sections for a subset of basic blocks.
119114
// The functions and the machine basic block ids are specified
120115
// in the file.
121-
// "none": Disable sections/labels for basic blocks.
116+
// "none": Disable sections for basic blocks.
122117
std::string BBSections;
123118

124119
// If set, override the default value of MCAsmInfo::BinutilsVersion. If

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4225,8 +4225,8 @@ defm basic_block_address_map : BoolFOption<"basic-block-address-map",
42254225
def fbasic_block_sections_EQ : Joined<["-"], "fbasic-block-sections=">, Group<f_Group>,
42264226
Visibility<[ClangOption, CC1Option, CC1AsOption]>,
42274227
HelpText<"Place each function's basic blocks in unique sections (ELF Only)">,
4228-
DocBrief<[{Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.}]>,
4229-
Values<"all,labels,none,list=">,
4228+
DocBrief<[{Place each basic block or a subset of basic blocks in its own section.}]>,
4229+
Values<"all,none,list=">,
42304230
MarshallingInfoString<CodeGenOpts<"BBSections">, [{"none"}]>;
42314231
defm data_sections : BoolFOption<"data-sections",
42324232
CodeGenOpts<"DataSections">, DefaultFalse,

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ static bool initTargetOptions(DiagnosticsEngine &Diags,
396396
Options.BBSections =
397397
llvm::StringSwitch<llvm::BasicBlockSection>(CodeGenOpts.BBSections)
398398
.Case("all", llvm::BasicBlockSection::All)
399-
.Case("labels", llvm::BasicBlockSection::Labels)
400399
.StartsWith("list=", llvm::BasicBlockSection::List)
401400
.Case("none", llvm::BasicBlockSection::None)
402401
.Default(llvm::BasicBlockSection::None);

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6225,9 +6225,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
62256225

62266226
if (Arg *A = Args.getLastArg(options::OPT_fbasic_block_sections_EQ)) {
62276227
StringRef Val = A->getValue();
6228-
if (Triple.isX86() && Triple.isOSBinFormatELF()) {
6229-
if (Val != "all" && Val != "labels" && Val != "none" &&
6230-
!Val.starts_with("list="))
6228+
if (Val == "labels") {
6229+
D.Diag(diag::warn_drv_deprecated_arg)
6230+
<< A->getAsString(Args) << /*hasReplacement=*/true
6231+
<< "-fbasic-block-address-map";
6232+
CmdArgs.push_back("-fbasic-block-address-map");
6233+
} else if (Triple.isX86() && Triple.isOSBinFormatELF()) {
6234+
if (Val != "all" && Val != "none" && !Val.starts_with("list="))
62316235
D.Diag(diag::err_drv_invalid_value)
62326236
<< A->getAsString(Args) << A->getValue();
62336237
else

clang/test/Driver/fbasic-block-sections.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
// CHECK-OPT-NONE: "-fbasic-block-sections=none"
2323
// CHECK-OPT-ALL: "-fbasic-block-sections=all"
2424
// CHECK-OPT-LIST: "-fbasic-block-sections={{[^ ]*}}fbasic-block-sections.c"
25-
// CHECK-OPT-LABELS: "-fbasic-block-sections=labels"
25+
// CHECK-OPT-LABELS: warning: argument '-fbasic-block-sections=labels' is deprecated, use '-fbasic-block-address-map' instead
26+
// CHECK-OPT-LABELS: "-fbasic-block-address-map"
2627
// CHECK-TRIPLE: error: unsupported option '-fbasic-block-sections=all' for target
2728
// CHECK-INVALID-VALUE: error: invalid value {{[^ ]*}} in '-fbasic-block-sections={{.*}}'
2829
// CHECK-OPT-NULL-LIST: "-fbasic-block-sections=list="

lld/ELF/LTO.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,16 @@ static lto::Config createConfig() {
6464
c.Options.BBAddrMap = config->ltoBBAddrMap;
6565

6666
// Check if basic block sections must be used.
67-
// Allowed values for --lto-basic-block-sections are "all", "labels",
67+
// Allowed values for --lto-basic-block-sections are "all",
6868
// "<file name specifying basic block ids>", or none. This is the equivalent
6969
// of -fbasic-block-sections= flag in clang.
7070
if (!config->ltoBasicBlockSections.empty()) {
7171
if (config->ltoBasicBlockSections == "all") {
7272
c.Options.BBSections = BasicBlockSection::All;
7373
} else if (config->ltoBasicBlockSections == "labels") {
74-
c.Options.BBSections = BasicBlockSection::Labels;
74+
c.Options.BBAddrMap = true;
75+
warn("'--lto-basic-block-sections=labels' is deprecated. Please use "
76+
"'-fbasic-block-address-map' instead.");
7577
} else if (config->ltoBasicBlockSections == "none") {
7678
c.Options.BBSections = BasicBlockSection::None;
7779
} else {

llvm/include/llvm/CodeGen/MachineFunction.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -699,11 +699,6 @@ class LLVM_EXTERNAL_VISIBILITY MachineFunction {
699699
BBSectionsType == BasicBlockSection::Preset);
700700
}
701701

702-
/// Returns true if basic block labels are to be generated for this function.
703-
bool hasBBLabels() const {
704-
return BBSectionsType == BasicBlockSection::Labels;
705-
}
706-
707702
void setBBSectionsType(BasicBlockSection V) { BBSectionsType = V; }
708703

709704
/// Assign IsBeginSection IsEndSection fields for basic blocks in this

llvm/include/llvm/Target/TargetOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ namespace llvm {
6464
List, // Get list of functions & BBs from a file. Selectively enables
6565
// basic block sections for a subset of basic blocks which can be
6666
// used to control object size bloats from creating sections.
67-
Labels, // Do not use Basic Block Sections but label basic blocks. This
68-
// is useful when associating profile counts from virtual addresses
69-
// to basic blocks.
7067
Preset, // Similar to list but the blocks are identified by passes which
7168
// seek to use Basic Block Sections, e.g. MachineFunctionSplitter.
7269
// This option cannot be set via the command line.

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ void AsmPrinter::emitFunctionBody() {
18591859
// We must emit temporary symbol for the end of this basic block, if either
18601860
// we have BBLabels enabled or if this basic blocks marks the end of a
18611861
// section.
1862-
if (MF->hasBBLabels() || MF->getTarget().Options.BBAddrMap ||
1862+
if (MF->getTarget().Options.BBAddrMap ||
18631863
(MAI->hasDotTypeDotSizeDirective() && MBB.isEndSection()))
18641864
OutStreamer->emitLabel(MBB.getEndSymbol());
18651865

@@ -2011,7 +2011,7 @@ void AsmPrinter::emitFunctionBody() {
20112011
// Emit section containing BB address offsets and their metadata, when
20122012
// BB labels are requested for this function. Skip empty functions.
20132013
if (HasAnyRealCode) {
2014-
if (MF->hasBBLabels() || MF->getTarget().Options.BBAddrMap)
2014+
if (MF->getTarget().Options.BBAddrMap)
20152015
emitBBAddrMapSection(*MF);
20162016
else if (PgoAnalysisMapFeatures.getBits() != 0)
20172017
MF->getContext().reportWarning(
@@ -2610,7 +2610,7 @@ void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
26102610
F.hasFnAttribute("xray-instruction-threshold") ||
26112611
needFuncLabels(MF, *this) || NeedsLocalForSize ||
26122612
MF.getTarget().Options.EmitStackSizeSection ||
2613-
MF.getTarget().Options.BBAddrMap || MF.hasBBLabels()) {
2613+
MF.getTarget().Options.BBAddrMap) {
26142614
CurrentFnBegin = createTempSymbol("func_begin");
26152615
if (NeedsLocalForSize)
26162616
CurrentFnSymForSize = CurrentFnBegin;
@@ -4093,8 +4093,7 @@ bool AsmPrinter::shouldEmitLabelForBasicBlock(
40934093
// With `-fbasic-block-sections=`, a label is needed for every non-entry block
40944094
// in the labels mode (option `=labels`) and every section beginning in the
40954095
// sections mode (`=all` and `=list=`).
4096-
if ((MF->hasBBLabels() || MF->getTarget().Options.BBAddrMap ||
4097-
MBB.isBeginSection()) &&
4096+
if ((MF->getTarget().Options.BBAddrMap || MBB.isBeginSection()) &&
40984097
!MBB.isEntryBlock())
40994098
return true;
41004099
// A label is needed for any block with at least one predecessor (when that

llvm/lib/CodeGen/BasicBlockSections.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,6 @@ bool BasicBlockSections::handleBBSections(MachineFunction &MF) {
311311
// original layout positions and finding the original fallthroughs.
312312
MF.RenumberBlocks();
313313

314-
if (BBSectionsType == BasicBlockSection::Labels) {
315-
MF.setBBSectionsType(BBSectionsType);
316-
return true;
317-
}
318-
319314
DenseMap<UniqueBBID, BBClusterInfo> FuncClusterInfo;
320315
if (BBSectionsType == BasicBlockSection::List) {
321316
auto [HasProfile, ClusterInfo] =
@@ -382,8 +377,6 @@ bool BasicBlockSections::handleBBSections(MachineFunction &MF) {
382377
// avoids the need to store basic block IDs in the BB address map section, since
383378
// they can be determined implicitly.
384379
bool BasicBlockSections::handleBBAddrMap(MachineFunction &MF) {
385-
if (MF.getTarget().getBBSectionsType() == BasicBlockSection::Labels)
386-
return false;
387380
if (!MF.getTarget().Options.BBAddrMap)
388381
return false;
389382
MF.RenumberBlocks();

llvm/lib/CodeGen/CommandFlags.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,6 @@ llvm::BasicBlockSection
525525
codegen::getBBSectionsMode(llvm::TargetOptions &Options) {
526526
if (getBBSections() == "all")
527527
return BasicBlockSection::All;
528-
else if (getBBSections() == "labels")
529-
return BasicBlockSection::Labels;
530528
else if (getBBSections() == "none")
531529
return BasicBlockSection::None;
532530
else {

llvm/lib/CodeGen/MIRParser/MIParser.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -800,10 +800,6 @@ bool MIParser::parseBasicBlockDefinition(
800800
MF.setBBSectionsType(BasicBlockSection::List);
801801
}
802802
if (BBID.has_value()) {
803-
// BBSectionsType is set to `List` if any basic blocks has `SectionID`.
804-
// Here, we set it to `Labels` if it hasn't been set above.
805-
if (!MF.hasBBSections())
806-
MF.setBBSectionsType(BasicBlockSection::Labels);
807803
MBB->setBBID(BBID.value());
808804
}
809805
MBB->setCallFrameSize(CallFrameSize);

llvm/lib/CodeGen/MIRParser/MIRParser.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,7 @@ MIRParserImpl::initializeMachineFunction(const yaml::MachineFunction &YamlMF,
540540
return true;
541541
}
542542
// Check Basic Block Section Flags.
543-
if (MF.getTarget().getBBSectionsType() == BasicBlockSection::Labels) {
544-
MF.setBBSectionsType(BasicBlockSection::Labels);
545-
} else if (MF.hasBBSections()) {
543+
if (MF.hasBBSections()) {
546544
MF.assignBeginEndSections();
547545
}
548546
PFS.SM = &SM;

llvm/lib/CodeGen/MachineFunction.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,9 @@ MachineFunction::CreateMachineBasicBlock(const BasicBlock *BB,
465465
MachineBasicBlock *MBB =
466466
new (BasicBlockRecycler.Allocate<MachineBasicBlock>(Allocator))
467467
MachineBasicBlock(*this, BB);
468-
// Set BBID for `-basic-block=sections=labels` and
469-
// `-basic-block-sections=list` to allow robust mapping of profiles to basic
470-
// blocks.
471-
if (Target.getBBSectionsType() == BasicBlockSection::Labels ||
472-
Target.Options.BBAddrMap ||
468+
// Set BBID for `-basic-block-sections=list` and `-basic-block-address-map` to
469+
// allow robust mapping of profiles to basic blocks.
470+
if (Target.Options.BBAddrMap ||
473471
Target.getBBSectionsType() == BasicBlockSection::List)
474472
MBB->setBBID(BBID.has_value() ? *BBID : UniqueBBID{NextBBID++, 0});
475473
return MBB;

llvm/test/CodeGen/X86/basic-block-sections-labels-empty-block.ll renamed to llvm/test/CodeGen/X86/basic-block-address-map-empty-block.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
;; This test verifies that with -gc-empty-basic-blocks SHT_LLVM_BB_ADDR_MAP will not include entries for empty blocks.
2-
; RUN: llc < %s -mtriple=x86_64 -O0 -basic-block-sections=labels -gc-empty-basic-blocks | FileCheck --check-prefix=CHECK %s
2+
; RUN: llc < %s -mtriple=x86_64 -O0 -basic-block-address-map -gc-empty-basic-blocks | FileCheck --check-prefix=CHECK %s
33

44
define void @foo(i1 zeroext %0) nounwind {
55
br i1 %0, label %2, label %empty_block

llvm/test/CodeGen/X86/basic-block-sections-labels-empty-function.ll renamed to llvm/test/CodeGen/X86/basic-block-address-map-empty-function.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;; Verify that the BB address map is not emitted for empty functions.
2-
; RUN: llc < %s -mtriple=x86_64 -basic-block-sections=labels | FileCheck %s --check-prefixes=CHECK,BASIC
3-
; RUN: llc < %s -mtriple=x86_64 -basic-block-sections=labels -pgo-analysis-map=func-entry-count,bb-freq | FileCheck %s --check-prefixes=CHECK,PGO
2+
; RUN: llc < %s -mtriple=x86_64 -basic-block-address-map | FileCheck %s --check-prefixes=CHECK,BASIC
3+
; RUN: llc < %s -mtriple=x86_64 -basic-block-address-map -pgo-analysis-map=func-entry-count,bb-freq | FileCheck %s --check-prefixes=CHECK,PGO
44

55
define void @empty_func() {
66
entry:

llvm/test/CodeGen/X86/basic-block-address-map-function-sections.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-sections=labels | FileCheck %s
21
; RUN: llc < %s -mtriple=x86_64 -function-sections -basic-block-address-map | FileCheck %s
32

43
$_Z4fooTIiET_v = comdat any

llvm/test/CodeGen/X86/basic-block-labels-mir-parse.mir renamed to llvm/test/CodeGen/X86/basic-block-address-map-mir-parse.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Start after bbsections0-prepare and check that the BB address map is generated.
2-
# RUN: llc -mtriple x86_64-unknown-linux-gnu -start-after=bbsections-prepare %s -o - | FileCheck %s -check-prefix=CHECK
2+
# RUN: llc -mtriple x86_64-unknown-linux-gnu -start-after=bbsections-prepare -basic-block-address-map %s -o - | FileCheck %s -check-prefix=CHECK
33

44
# How to generate the input:
55
# foo.cc
@@ -9,7 +9,7 @@
99
# }
1010
#
1111
# clang -O0 -S -emit-llvm foo.cc
12-
# llc < foo.ll -stop-after=bbsections-prepare -basic-block-sections=labels
12+
# llc < foo.ll -stop-after=bbsections-prepare -basic-block-address-map
1313

1414
# CHECK: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text
1515
--- |

llvm/test/CodeGen/X86/basic-block-address-map.ll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
; Check the basic block sections labels option
22
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map | FileCheck %s --check-prefixes=CHECK,UNIQ
3-
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-sections=labels | FileCheck %s --check-prefixes=CHECK,UNIQ
43
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=false -basic-block-address-map | FileCheck %s --check-prefixes=CHECK,NOUNIQ
5-
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=false -basic-block-sections=labels | FileCheck %s --check-prefixes=CHECK,NOUNIQ
6-
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-sections=labels -split-machine-functions | FileCheck %s --check-prefixes=CHECK,UNIQ
4+
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -split-machine-functions | FileCheck %s --check-prefixes=CHECK,UNIQ
75

86
define void @_Z3bazb(i1 zeroext, i1 zeroext) personality ptr @__gxx_personality_v0 {
97
br i1 %0, label %3, label %8

llvm/test/CodeGen/X86/basic-block-sections-labels-pgo-features.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
; Check the basic block sections labels option
2-
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-sections=labels | FileCheck %s --check-prefixes=CHECK,BASIC
2+
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map | FileCheck %s --check-prefixes=CHECK,BASIC
33

44
;; Also verify this holds for all PGO features enabled
5-
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-sections=labels -pgo-analysis-map=func-entry-count,bb-freq,br-prob | FileCheck %s --check-prefixes=CHECK,PGO-ALL,PGO-FEC,PGO-BBF,PGO-BRP
5+
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -pgo-analysis-map=func-entry-count,bb-freq,br-prob | FileCheck %s --check-prefixes=CHECK,PGO-ALL,PGO-FEC,PGO-BBF,PGO-BRP
66

77
;; Also verify that pgo extension only includes the enabled feature
8-
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-sections=labels -pgo-analysis-map=func-entry-count | FileCheck %s --check-prefixes=CHECK,PGO-FEC,FEC-ONLY
9-
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-sections=labels -pgo-analysis-map=bb-freq | FileCheck %s --check-prefixes=CHECK,PGO-BBF,BBF-ONLY
10-
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-sections=labels -pgo-analysis-map=br-prob | FileCheck %s --check-prefixes=CHECK,PGO-BRP,BRP-ONLY
8+
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -pgo-analysis-map=func-entry-count | FileCheck %s --check-prefixes=CHECK,PGO-FEC,FEC-ONLY
9+
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -pgo-analysis-map=bb-freq | FileCheck %s --check-prefixes=CHECK,PGO-BBF,BBF-ONLY
10+
; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-address-map -pgo-analysis-map=br-prob | FileCheck %s --check-prefixes=CHECK,PGO-BRP,BRP-ONLY
1111

1212

1313
define void @_Z3bazb(i1 zeroext, i1 zeroext) personality ptr @__gxx_personality_v0 !prof !0 {

llvm/test/CodeGen/X86/basic-block-sections-mir-print.ll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; Stop after bbsections-prepare and check MIR output for section type.
2-
; RUN: llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=labels -stop-after=bbsections-prepare | FileCheck %s -check-prefix=BBLABELS
2+
; RUN: llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-address-map -stop-after=bbsections-prepare | FileCheck %s -check-prefix=BBADDRMAP
33
; RUN: echo '!_Z3foob' > %t
44
; RUN: echo '!!1' >> %t
55
; RUN: echo '!!2' >> %t
@@ -33,7 +33,7 @@ define dso_local i32 @_Z3foob(i1 zeroext %0) {
3333
; BBSECTIONS: bb.1 (%ir-block.7, bb_id 1)
3434
; BBSECTIONS: bb.2 (%ir-block.8, bbsections 1, bb_id 2):
3535

36-
; BBLABELS: bb.0 (%ir-block.1, bb_id 0):
37-
; BBLABELS: bb.1 (%ir-block.7, bb_id 1):
38-
; BBLABELS: bb.2 (%ir-block.8, bb_id 2):
39-
; BBLABELS: bb.3 (%ir-block.9, bb_id 3):
36+
; BBADDRMAP: bb.0 (%ir-block.1, bb_id 0):
37+
; BBADDRMAP: bb.1 (%ir-block.7, bb_id 1):
38+
; BBADDRMAP: bb.2 (%ir-block.8, bb_id 2):
39+
; BBADDRMAP: bb.3 (%ir-block.9, bb_id 3):

0 commit comments

Comments
 (0)