Skip to content

Commit fcecf17

Browse files
authored
[SHT_LLVM_BB_ADDR_MAP] Emit callsite offsets in the SHT_LLVM_BB_ADDR_MAP section. (#146563)
Callsite offsets will help map addresses to the right position in the basic block (before or after a callsite). This PR also bumps the BBAddrMap version to 3. The encoding/decoding ability is already pushed upstream 8d7a8fc.
1 parent 4c27279 commit fcecf17

11 files changed

+180
-67
lines changed

llvm/docs/Extensions.rst

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -405,31 +405,73 @@ This section is emitted with ``-basic-block-address-map`` and will contain
405405
a BB address map table for every function.
406406

407407
The ``SHT_LLVM_BB_ADDR_MAP`` type provides backward compatibility to allow
408-
reading older versions of the BB address map generated by older compilers. Each
409-
function entry starts with a version byte which specifies the encoding version
410-
to use. The following versioning schemes are currently supported.
408+
reading older versions of the BB address map generated by older compilers (up to
409+
two years old). Each function entry starts with a version byte which specifies
410+
the encoding version to use. This is followed by a feature byte which specifies
411+
the features specific to this particular entry. The function base address is
412+
stored as a full address. Other addresses in the entry (block begin and end
413+
addresses and callsite addresses) are stored in a running-offset fashion, as
414+
offsets relative to prior addresses.
411415

412-
Version 1 (newest): basic block address offsets are computed relative to the end
413-
of previous blocks.
416+
The following versioning schemes are currently supported (newer versions support
417+
features of the older versions).
418+
419+
Version 3 (newest): Capable of encoding callsite offsets. Enabled by the 6th bit
420+
of the feature byte.
414421

415422
Example:
416423

417424
.. code-block:: gas
418425
419426
.section ".llvm_bb_addr_map","",@llvm_bb_addr_map
420-
.byte 1 # version number
421-
.byte 0 # feature byte (reserved for future use)
427+
.byte 3 # version number
428+
.byte 32 # feature byte
422429
.quad .Lfunc_begin0 # address of the function
423430
.byte 2 # number of basic blocks
424431
# BB record for BB_0
425-
.uleb128 .Lfunc_beign0-.Lfunc_begin0 # BB_0 offset relative to function entry (always zero)
432+
.byte 0 # BB_0 ID
433+
.uleb128 .Lfunc_begin0-.Lfunc_begin0 # BB_0 offset relative to function entry (always zero)
434+
.byte 0 # number of callsites in this block
426435
.uleb128 .LBB_END0_0-.Lfunc_begin0 # BB_0 size
427436
.byte x # BB_0 metadata
428437
# BB record for BB_1
438+
.byte 1 # BB_1 ID
429439
.uleb128 .LBB0_1-.LBB_END0_0 # BB_1 offset relative to the end of last block (BB_0).
430-
.uleb128 .LBB_END0_1-.LBB0_1 # BB_1 size
440+
.byte 2 # number of callsites in this block
441+
.uleb128 .LBB0_1_CS0-.LBB0_1 # offset of callsite relative to the previous offset (.LBB0_1)
442+
.uleb128 .LBB0_1_CS1-.LBB0_1_CS0 # offset of callsite relative to the previous offset (.LBB0_1_CS0)
443+
.uleb128 .LBB_END0_1-.LBB0_1_CS1 # BB_1 size offset (Offset of the block end relative to the previous offset).
431444
.byte y # BB_1 metadata
432445
446+
Version 2: Capable of encoding split functions. Enabled by the 4th bit of the
447+
feature byte. The base address of each split range is stored as a full address.
448+
The first range corresponds to the function entry.
449+
450+
Example:
451+
452+
.. code-block:: gas
453+
454+
.section ".llvm_bb_addr_map","",@llvm_bb_addr_map
455+
.byte 2 # version number
456+
.byte 8 # feature byte
457+
.byte 2 # number of basic block ranges
458+
# 1st BB range (corresponding to the function entry)
459+
.quad .Lfunc_begin0 # base address
460+
.byte 1 # number of basic blocks in this range
461+
# BB record for BB_0
462+
.byte 0 # BB_0 ID
463+
.uleb128 .Lfunc_begin0-.Lfunc_begin0 # BB_0 offset relative to function entry (always zero)
464+
.uleb128 .LBB_END0_0-.Lfunc_begin0 # BB_0 size
465+
.byte x # BB_0 metadata
466+
# 2nd BB range
467+
.quad func.part.1
468+
.byte 1 # number of basic blocks in this range
469+
# BB record for BB_1
470+
.byte 1 # BB_1 ID
471+
.uleb128 func.part.1-func.part.1 # BB_1 offset relative to the range begin (always zero)
472+
.uleb128 .LBB_END0_1-func.part.1 # BB_1 size
473+
.byte 1 # BB_1 metadata
474+
433475
PGO Analysis Map
434476
""""""""""""""""
435477

llvm/include/llvm/CodeGen/AsmPrinter.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ class LLVM_ABI AsmPrinter : public MachineFunctionPass {
135135
/// default, this is equal to CurrentFnSym.
136136
MCSymbol *CurrentFnSymForSize = nullptr;
137137

138+
/// Vector of symbols marking the position of callsites in the current
139+
/// function, keyed by their containing basic block.
140+
/// The callsite symbols of each block are stored in the order they appear
141+
/// in that block.
142+
DenseMap<const MachineBasicBlock *, SmallVector<MCSymbol *, 1>>
143+
CurrentFnCallsiteSymbols;
144+
138145
/// Provides the profile information for constants.
139146
const StaticDataProfileInfo *SDPI = nullptr;
140147

@@ -295,6 +302,10 @@ class LLVM_ABI AsmPrinter : public MachineFunctionPass {
295302
/// to emit them as well, return the whole set.
296303
ArrayRef<MCSymbol *> getAddrLabelSymbolToEmit(const BasicBlock *BB);
297304

305+
/// Creates a new symbol to be used for the beginning of a callsite at the
306+
/// specified basic block.
307+
MCSymbol *createCallsiteSymbol(const MachineBasicBlock &MBB);
308+
298309
/// If the specified function has had any references to address-taken blocks
299310
/// generated, but the block got deleted, return the symbol now so we can
300311
/// emit it. This prevents emitting a reference to a symbol that has no

llvm/include/llvm/MC/MCContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ class MCContext {
175175
/// for the LocalLabelVal and adds it to the map if needed.
176176
unsigned GetInstance(unsigned LocalLabelVal);
177177

178-
/// LLVM_BB_ADDR_MAP version to emit.
179-
uint8_t BBAddrMapVersion = 2;
178+
/// SHT_LLVM_BB_ADDR_MAP version to emit.
179+
uint8_t BBAddrMapVersion = 3;
180180

181181
/// The file name of the log file from the environment variable
182182
/// AS_SECURE_LOG_FILE. Which must be set before the .secure_log_unique

llvm/include/llvm/Object/ELFTypes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,8 +917,8 @@ struct BBAddrMap {
917917
uint32_t Size = 0; // Size of the basic block.
918918
Metadata MD = {false, false, false, false,
919919
false}; // Metdata for this basic block.
920-
// Offsets of callsites (end of call instructions), relative to the basic
921-
// block start.
920+
// Offsets of callsites (beginning of call instructions), relative to the
921+
// basic block start.
922922
SmallVector<uint32_t, 1> CallsiteOffsets;
923923

924924
BBEntry(uint32_t ID, uint32_t Offset, uint32_t Size, Metadata MD,

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,8 @@ static uint32_t getBBAddrMapMetadata(const MachineBasicBlock &MBB) {
13911391
}
13921392

13931393
static llvm::object::BBAddrMap::Features
1394-
getBBAddrMapFeature(const MachineFunction &MF, int NumMBBSectionRanges) {
1394+
getBBAddrMapFeature(const MachineFunction &MF, int NumMBBSectionRanges,
1395+
bool HasCalls) {
13951396
// Ensure that the user has not passed in additional options while also
13961397
// specifying all or none.
13971398
if ((PgoAnalysisMapFeatures.isSet(PGOMapFeaturesEnum::None) ||
@@ -1424,13 +1425,14 @@ getBBAddrMapFeature(const MachineFunction &MF, int NumMBBSectionRanges) {
14241425
BrProbEnabled,
14251426
MF.hasBBSections() && NumMBBSectionRanges > 1,
14261427
static_cast<bool>(BBAddrMapSkipEmitBBEntries),
1427-
false};
1428+
HasCalls};
14281429
}
14291430

14301431
void AsmPrinter::emitBBAddrMapSection(const MachineFunction &MF) {
14311432
MCSection *BBAddrMapSection =
14321433
getObjFileLowering().getBBAddrMapSection(*MF.getSection());
14331434
assert(BBAddrMapSection && ".llvm_bb_addr_map section is not initialized.");
1435+
bool HasCalls = !CurrentFnCallsiteSymbols.empty();
14341436

14351437
const MCSymbol *FunctionSymbol = getFunctionBegin();
14361438

@@ -1440,7 +1442,7 @@ void AsmPrinter::emitBBAddrMapSection(const MachineFunction &MF) {
14401442
uint8_t BBAddrMapVersion = OutStreamer->getContext().getBBAddrMapVersion();
14411443
OutStreamer->emitInt8(BBAddrMapVersion);
14421444
OutStreamer->AddComment("feature");
1443-
auto Features = getBBAddrMapFeature(MF, MBBSectionRanges.size());
1445+
auto Features = getBBAddrMapFeature(MF, MBBSectionRanges.size(), HasCalls);
14441446
OutStreamer->emitInt8(Features.encode());
14451447
// Emit BB Information for each basic block in the function.
14461448
if (Features.MultiBBRange) {
@@ -1493,13 +1495,23 @@ void AsmPrinter::emitBBAddrMapSection(const MachineFunction &MF) {
14931495
// Emit the basic block offset relative to the end of the previous block.
14941496
// This is zero unless the block is padded due to alignment.
14951497
emitLabelDifferenceAsULEB128(MBBSymbol, PrevMBBEndSymbol);
1496-
// Emit the basic block size. When BBs have alignments, their size cannot
1497-
// always be computed from their offsets.
1498-
emitLabelDifferenceAsULEB128(MBB.getEndSymbol(), MBBSymbol);
1498+
const MCSymbol *CurrentLabel = MBBSymbol;
1499+
if (HasCalls) {
1500+
auto CallsiteSymbols = CurrentFnCallsiteSymbols.lookup(&MBB);
1501+
OutStreamer->AddComment("number of callsites");
1502+
OutStreamer->emitULEB128IntValue(CallsiteSymbols.size());
1503+
for (const MCSymbol *CallsiteSymbol : CallsiteSymbols) {
1504+
// Emit the callsite offset.
1505+
emitLabelDifferenceAsULEB128(CallsiteSymbol, CurrentLabel);
1506+
CurrentLabel = CallsiteSymbol;
1507+
}
1508+
}
1509+
// Emit the offset to the end of the block, which can be used to compute
1510+
// the total block size.
1511+
emitLabelDifferenceAsULEB128(MBB.getEndSymbol(), CurrentLabel);
14991512
// Emit the Metadata.
15001513
OutStreamer->emitULEB128IntValue(getBBAddrMapMetadata(MBB));
15011514
}
1502-
15031515
PrevMBBEndSymbol = MBB.getEndSymbol();
15041516
}
15051517

@@ -1828,6 +1840,8 @@ void AsmPrinter::emitFunctionBody() {
18281840
!MI.isDebugInstr()) {
18291841
HasAnyRealCode = true;
18301842
}
1843+
if (MI.isCall() && MF->getTarget().Options.BBAddrMap)
1844+
OutStreamer->emitLabel(createCallsiteSymbol(MBB));
18311845

18321846
// If there is a pre-instruction symbol, emit a label for it here.
18331847
if (MCSymbol *S = MI.getPreInstrSymbol())
@@ -2775,6 +2789,14 @@ MCSymbol *AsmPrinter::getMBBExceptionSym(const MachineBasicBlock &MBB) {
27752789
return Res.first->second;
27762790
}
27772791

2792+
MCSymbol *AsmPrinter::createCallsiteSymbol(const MachineBasicBlock &MBB) {
2793+
MCContext &Ctx = MF->getContext();
2794+
MCSymbol *Sym = Ctx.createTempSymbol("BB" + Twine(MF->getFunctionNumber()) +
2795+
"_" + Twine(MBB.getNumber()) + "_CS");
2796+
CurrentFnCallsiteSymbols[&MBB].push_back(Sym);
2797+
return Sym;
2798+
}
2799+
27782800
void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
27792801
this->MF = &MF;
27802802
const Function &F = MF.getFunction();
@@ -2809,6 +2831,7 @@ void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
28092831
CurrentFnBegin = nullptr;
28102832
CurrentFnBeginLocal = nullptr;
28112833
CurrentSectionBeginSym = nullptr;
2834+
CurrentFnCallsiteSymbols.clear();
28122835
MBBSectionRanges.clear();
28132836
MBBSectionExceptionSyms.clear();
28142837
bool NeedsLocalForSize = MAI->needsLocalForSize();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ entry:
1919
; CHECK: func:
2020
; CHECK: .Lfunc_begin1:
2121
; CHECK: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text{{$}}
22-
; CHECK-NEXT: .byte 2 # version
22+
; CHECK-NEXT: .byte 3 # version
2323
; BASIC-NEXT: .byte 0 # feature
2424
; PGO-NEXT: .byte 3 # feature
2525
; CHECK-NEXT: .quad .Lfunc_begin1 # function address

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ define dso_local i32 @_Z3barv() {
1010
; CHECK-LABEL: _Z3barv:
1111
; CHECK-NEXT: [[BAR_BEGIN:.Lfunc_begin[0-9]+]]:
1212
; CHECK: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text._Z3barv{{$}}
13-
; CHECK-NEXT: .byte 2 # version
13+
; CHECK-NEXT: .byte 3 # version
1414
; CHECK-NEXT: .byte 0 # feature
1515
; CHECK-NEXT: .quad [[BAR_BEGIN]] # function address
1616

@@ -23,8 +23,8 @@ define dso_local i32 @_Z3foov() {
2323
; CHECK-LABEL: _Z3foov:
2424
; CHECK-NEXT: [[FOO_BEGIN:.Lfunc_begin[0-9]+]]:
2525
; CHECK: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text._Z3foov{{$}}
26-
; CHECK-NEXT: .byte 2 # version
27-
; CHECK-NEXT: .byte 0 # feature
26+
; CHECK-NEXT: .byte 3 # version
27+
; CHECK-NEXT: .byte 32 # feature
2828
; CHECK-NEXT: .quad [[FOO_BEGIN]] # function address
2929

3030

@@ -36,6 +36,6 @@ define linkonce_odr dso_local i32 @_Z4fooTIiET_v() comdat {
3636
; CHECK-LABEL: _Z4fooTIiET_v:
3737
; CHECK-NEXT: [[FOOCOMDAT_BEGIN:.Lfunc_begin[0-9]+]]:
3838
; CHECK: .section .llvm_bb_addr_map,"oG",@llvm_bb_addr_map,.text._Z4fooTIiET_v,_Z4fooTIiET_v,comdat{{$}}
39-
; CHECK-NEXT: .byte 2 # version
39+
; CHECK-NEXT: .byte 3 # version
4040
; CHECK-NEXT: .byte 0 # feature
4141
; CHECK-NEXT: .quad [[FOOCOMDAT_BEGIN]] # function address

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

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,36 +69,44 @@ declare i32 @__gxx_personality_v0(...)
6969
; CHECK-LABEL: .Lfunc_end0:
7070

7171
; CHECK: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text._Z3bazb{{$}}
72-
; CHECK-NEXT: .byte 2 # version
73-
; BASIC-NEXT: .byte 0 # feature
74-
; PGO-ALL-NEXT: .byte 7 # feature
75-
; FEC-ONLY-NEXT:.byte 1 # feature
76-
; BBF-ONLY-NEXT:.byte 2 # feature
77-
; BRP-ONLY-NEXT:.byte 4 # feature
72+
; CHECK-NEXT: .byte 3 # version
73+
; BASIC-NEXT: .byte 32 # feature
74+
; PGO-ALL-NEXT: .byte 39 # feature
75+
; FEC-ONLY-NEXT:.byte 33 # feature
76+
; BBF-ONLY-NEXT:.byte 34 # feature
77+
; BRP-ONLY-NEXT:.byte 36 # feature
7878
; CHECK-NEXT: .quad .Lfunc_begin0 # function address
7979
; CHECK-NEXT: .byte 6 # number of basic blocks
8080
; CHECK-NEXT: .byte 0 # BB id
8181
; CHECK-NEXT: .uleb128 .Lfunc_begin0-.Lfunc_begin0
82+
; CHECK-NEXT: .byte 0 # number of callsites
8283
; CHECK-NEXT: .uleb128 .LBB_END0_0-.Lfunc_begin0
8384
; CHECK-NEXT: .byte 8
8485
; CHECK-NEXT: .byte 1 # BB id
8586
; CHECK-NEXT: .uleb128 .LBB0_1-.LBB_END0_0
86-
; CHECK-NEXT: .uleb128 .LBB_END0_1-.LBB0_1
87+
; CHECK-NEXT: .byte 1 # number of callsites
88+
; CHECK-NEXT: .uleb128 .LBB0_1_CS0-.LBB0_1
89+
; CHECK-NEXT: .uleb128 .LBB_END0_1-.LBB0_1_CS0
8790
; CHECK-NEXT: .byte 8
8891
; CHECK-NEXT: .byte 3 # BB id
8992
; CHECK-NEXT: .uleb128 .LBB0_2-.LBB_END0_1
90-
; CHECK-NEXT: .uleb128 .LBB_END0_2-.LBB0_2
93+
; CHECK-NEXT: .byte 1 # number of callsites
94+
; CHECK-NEXT: .uleb128 .LBB0_2_CS0-.LBB0_2
95+
; CHECK-NEXT: .uleb128 .LBB_END0_2-.LBB0_2_CS0
9196
; CHECK-NEXT: .byte 8
9297
; CHECK-NEXT: .byte 5 # BB id
9398
; CHECK-NEXT: .uleb128 .LBB0_3-.LBB_END0_2
99+
; CHECK-NEXT: .byte 0 # number of callsites
94100
; CHECK-NEXT: .uleb128 .LBB_END0_3-.LBB0_3
95101
; CHECK-NEXT: .byte 1
96102
; CHECK-NEXT: .byte 4 # BB id
97103
; CHECK-NEXT: .uleb128 .LBB0_4-.LBB_END0_3
104+
; CHECK-NEXT: .byte 0 # number of callsites
98105
; CHECK-NEXT: .uleb128 .LBB_END0_4-.LBB0_4
99106
; CHECK-NEXT: .byte 16
100107
; CHECK-NEXT: .byte 2 # BB id
101108
; CHECK-NEXT: .uleb128 .LBB0_5-.LBB_END0_4
109+
; CHECK-NEXT: .byte 0 # number of callsites
102110
; CHECK-NEXT: .uleb128 .LBB_END0_5-.LBB0_5
103111
; CHECK-NEXT: .byte 4
104112

@@ -138,7 +146,7 @@ declare i32 @__gxx_personality_v0(...)
138146
; PGO-BRP-NEXT: .byte 5 # successor BB ID
139147
; PGO-BRP-NEXT: .ascii "\200\200\200\200\b" # successor branch probability
140148

141-
; SKIP-BB-ENTRIES: .byte 17 # feature
149+
; SKIP-BB-ENTRIES: .byte 49 # feature
142150
; SKIP-BB-ENTRIES-NEXT: .quad .Lfunc_begin0 # function address
143151
; SKIP-BB-ENTRIES-NEXT: .byte 6 # number of basic blocks
144152
; SKIP-BB-ENTRIES-NEXT: .byte 100 # function entry count

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

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,41 @@ declare i32 @__gxx_personality_v0(...)
3939
; CHECK-LABEL: .LBB_END0_1:
4040
; CHECK: .section .text.split._Z3bazb,"ax",@progbits
4141
; CHECK-LABEL: _Z3bazb.cold:
42+
; CHECK-LABEL: .LBB0_2_CS0:
4243
; CHECK-LABEL: .LBB_END0_2:
4344
; CHECK-LABEL: .LBB0_3:
45+
; CHECK-LABEL: .LBB0_3_CS0:
4446
; CHECK-LABEL: .LBB_END0_3:
4547
; CHECK-LABEL: .Lfunc_end0:
4648

4749
; CHECK: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text.hot._Z3bazb
48-
; CHECK-NEXT: .byte 2 # version
49-
; CHECK-NEXT: .byte 8 # feature
50-
; CHECK-NEXT: .byte 2 # number of basic block ranges
51-
; CHECK-NEXT: .quad .Lfunc_begin0 # base address
52-
; CHECK-NEXT: .byte 2 # number of basic blocks
53-
; CHECK-NEXT: .byte 0 # BB id
54-
; CHECK-NEXT: .uleb128 .Lfunc_begin0-.Lfunc_begin0
55-
; CHECK-NEXT: .uleb128 .LBB_END0_0-.Lfunc_begin0
56-
; CHECK-NEXT: .byte 0
57-
; CHECK-NEXT: .byte 2 # BB id
58-
; CHECK-NEXT: .uleb128 .LBB0_1-.LBB_END0_0
59-
; CHECK-NEXT: .uleb128 .LBB_END0_1-.LBB0_1
60-
; CHECK-NEXT: .byte 5
61-
; CHECK-NEXT: .quad _Z3bazb.cold # base address
62-
; CHECK-NEXT: .byte 2 # number of basic blocks
63-
; CHECK-NEXT: .byte 1 # BB id
64-
; CHECK-NEXT: .uleb128 _Z3bazb.cold-_Z3bazb.cold
65-
; CHECK-NEXT: .uleb128 .LBB_END0_2-_Z3bazb.cold
66-
; CHECK-NEXT: .byte 8
67-
; CHECK-NEXT: .byte 3 # BB id
68-
; CHECK-NEXT: .uleb128 .LBB0_3-.LBB_END0_2
69-
; CHECK-NEXT: .uleb128 .LBB_END0_3-.LBB0_3
50+
; CHECK-NEXT: .byte 3 # version
51+
; CHECK-NEXT: .byte 40 # feature
52+
; CHECK-NEXT: .byte 2 # number of basic block ranges
53+
; CHECK-NEXT: .quad .Lfunc_begin0 # base address
54+
; CHECK-NEXT: .byte 2 # number of basic blocks
55+
; CHECK-NEXT: .byte 0 # BB id
56+
; CHECK-NEXT: .uleb128 .Lfunc_begin0-.Lfunc_begin0
57+
; CHECK-NEXT: .byte 0 # number of callsites
58+
; CHECK-NEXT: .uleb128 .LBB_END0_0-.Lfunc_begin0
59+
; CHECK-NEXT: .byte 0
60+
; CHECK-NEXT: .byte 2 # BB id
61+
; CHECK-NEXT: .uleb128 .LBB0_1-.LBB_END0_0
62+
; CHECK-NEXT: .byte 0 # number of callsites
63+
; CHECK-NEXT: .uleb128 .LBB_END0_1-.LBB0_1
64+
; CHECK-NEXT: .byte 5
65+
; CHECK-NEXT: .quad _Z3bazb.cold # base address
66+
; CHECK-NEXT: .byte 2 # number of basic blocks
67+
; CHECK-NEXT: .byte 1 # BB id
68+
; CHECK-NEXT: .uleb128 _Z3bazb.cold-_Z3bazb.cold
69+
; CHECK-NEXT: .byte 1 # number of callsites
70+
; CHECK-NEXT: .uleb128 .LBB0_2_CS0-_Z3bazb.cold
71+
; CHECK-NEXT: .uleb128 .LBB_END0_2-.LBB0_2_CS0
72+
; CHECK-NEXT: .byte 8
73+
; CHECK-NEXT: .byte 3 # BB id
74+
; CHECK-NEXT: .uleb128 .LBB0_3-.LBB_END0_2
75+
; CHECK-NEXT: .byte 1 # number of callsites
76+
; CHECK-NEXT: .uleb128 .LBB0_3_CS0-.LBB0_3
77+
; CHECK-NEXT: .uleb128 .LBB_END0_3-.LBB0_3_CS0
7078
; CHECK-NEXT: .byte 1
7179

0 commit comments

Comments
 (0)