Skip to content

Commit efadcc6

Browse files
committed
LLVM and SPIRV-LLVM-Translator pulldown (WW49)
LLVM: llvm/llvm-project@fa06d4d SPIRV-LLVM-Translator: KhronosGroup/SPIRV-LLVM-Translator@b95227e
2 parents 73a992b + b69ee6f commit efadcc6

File tree

4,156 files changed

+151351
-64248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,156 files changed

+151351
-64248
lines changed

.github/workflows/sycl_post_commit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- .github/workflows/sycl_macos_build_and_test.yml
1616
workflow_dispatch:
1717

18+
1819
jobs:
1920
# This job generates matrix of tests for LLVM Test Suite
2021
test_matrix:

bolt/include/bolt/Core/BinaryBasicBlock.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ class BinaryBasicBlock {
570570
}
571571

572572
/// Return required alignment for the block.
573+
Align getAlign() const { return Align(Alignment); }
573574
uint32_t getAlignment() const { return Alignment; }
574575

575576
/// Set the maximum number of bytes to use for the block alignment.

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
#include "llvm/MC/MCSymbol.h"
3838
#include "llvm/MC/TargetRegistry.h"
3939
#include "llvm/Support/ErrorOr.h"
40+
#include "llvm/Support/RWMutex.h"
4041
#include "llvm/Support/raw_ostream.h"
4142
#include <functional>
4243
#include <list>
4344
#include <map>
4445
#include <set>
45-
#include <shared_mutex>
4646
#include <string>
4747
#include <system_error>
4848
#include <type_traits>
@@ -190,7 +190,7 @@ class BinaryContext {
190190
std::map<uint64_t, BinaryFunction> BinaryFunctions;
191191

192192
/// A mutex that is used to control parallel accesses to BinaryFunctions
193-
mutable std::shared_timed_mutex BinaryFunctionsMutex;
193+
mutable llvm::sys::RWMutex BinaryFunctionsMutex;
194194

195195
/// Functions injected by BOLT
196196
std::vector<BinaryFunction *> InjectedBinaryFunctions;
@@ -420,7 +420,7 @@ class BinaryContext {
420420
std::unordered_map<const MCSymbol *, BinaryFunction *> SymbolToFunctionMap;
421421

422422
/// A mutex that is used to control parallel accesses to SymbolToFunctionMap
423-
mutable std::shared_timed_mutex SymbolToFunctionMapMutex;
423+
mutable llvm::sys::RWMutex SymbolToFunctionMapMutex;
424424

425425
/// Look up the symbol entry that contains the given \p Address (based on
426426
/// the start address and size for each symbol). Returns a pointer to
@@ -556,9 +556,9 @@ class BinaryContext {
556556
std::unique_ptr<MCContext> Ctx;
557557

558558
/// A mutex that is used to control parallel accesses to Ctx
559-
mutable std::shared_timed_mutex CtxMutex;
560-
std::unique_lock<std::shared_timed_mutex> scopeLock() const {
561-
return std::unique_lock<std::shared_timed_mutex>(CtxMutex);
559+
mutable llvm::sys::RWMutex CtxMutex;
560+
std::unique_lock<llvm::sys::RWMutex> scopeLock() const {
561+
return std::unique_lock<llvm::sys::RWMutex>(CtxMutex);
562562
}
563563

564564
std::unique_ptr<DWARFContext> DwCtx;

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "llvm/MC/MCInst.h"
4646
#include "llvm/MC/MCSymbol.h"
4747
#include "llvm/Object/ObjectFile.h"
48+
#include "llvm/Support/RWMutex.h"
4849
#include "llvm/Support/raw_ostream.h"
4950
#include <algorithm>
5051
#include <iterator>
@@ -1166,7 +1167,7 @@ class BinaryFunction {
11661167

11671168
MCSymbol *&FunctionEndLabel = FunctionEndLabels[LabelIndex];
11681169
if (!FunctionEndLabel) {
1169-
std::unique_lock<std::shared_timed_mutex> Lock(BC.CtxMutex);
1170+
std::unique_lock<llvm::sys::RWMutex> Lock(BC.CtxMutex);
11701171
if (Fragment == FragmentNum::main())
11711172
FunctionEndLabel = BC.Ctx->createNamedTempSymbol("func_end");
11721173
else
@@ -1490,7 +1491,7 @@ class BinaryFunction {
14901491
std::unique_ptr<BinaryBasicBlock>
14911492
createBasicBlock(MCSymbol *Label = nullptr) {
14921493
if (!Label) {
1493-
std::unique_lock<std::shared_timed_mutex> Lock(BC.CtxMutex);
1494+
std::unique_lock<llvm::sys::RWMutex> Lock(BC.CtxMutex);
14941495
Label = BC.Ctx->createNamedTempSymbol("BB");
14951496
}
14961497
auto BB =
@@ -1784,6 +1785,7 @@ class BinaryFunction {
17841785
return *this;
17851786
}
17861787

1788+
Align getAlign() const { return Align(Alignment); }
17871789
uint16_t getAlignment() const { return Alignment; }
17881790

17891791
BinaryFunction &setMaxAlignmentBytes(uint16_t MaxAlignBytes) {

bolt/include/bolt/Core/BinarySection.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ class BinarySection {
254254
uint64_t getEndAddress() const { return Address + Size; }
255255
uint64_t getSize() const { return Size; }
256256
uint64_t getInputFileOffset() const { return InputFileOffset; }
257+
Align getAlign() const { return Align(Alignment); }
257258
uint64_t getAlignment() const { return Alignment; }
258259
bool isText() const {
259260
if (isELF())

bolt/include/bolt/Passes/Aligner.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define BOLT_PASSES_ALIGNER_H
1717

1818
#include "bolt/Passes/BinaryPasses.h"
19+
#include "llvm/Support/RWMutex.h"
1920

2021
namespace llvm {
2122
namespace bolt {
@@ -24,7 +25,7 @@ class AlignerPass : public BinaryFunctionPass {
2425
private:
2526
/// Stats for usage of max bytes for basic block alignment.
2627
std::vector<uint32_t> AlignHistogram;
27-
std::shared_timed_mutex AlignHistogramMtx;
28+
llvm::sys::RWMutex AlignHistogramMtx;
2829

2930
/// Stats: execution count of blocks that were aligned.
3031
std::atomic<uint64_t> AlignedBlocksCount{0};

bolt/include/bolt/Passes/Instrumentation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "bolt/Passes/BinaryPasses.h"
2121
#include "bolt/Passes/InstrumentationSummary.h"
22+
#include "llvm/Support/RWMutex.h"
2223

2324
namespace llvm {
2425
namespace bolt {
@@ -109,7 +110,7 @@ class Instrumentation : public BinaryFunctionPass {
109110
/// strtab indices in StringTable for each function name
110111
std::unordered_map<const BinaryFunction *, uint32_t> FuncToStringIdx;
111112

112-
mutable std::shared_timed_mutex FDMutex;
113+
mutable llvm::sys::RWMutex FDMutex;
113114

114115
/// The data generated during Instrumentation pass that needs to
115116
/// be passed to the Instrument runtime library.

bolt/lib/Core/BinaryBasicBlock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ void BinaryBasicBlock::addBranchInstruction(const BinaryBasicBlock *Successor) {
491491
assert(isSuccessor(Successor));
492492
BinaryContext &BC = Function->getBinaryContext();
493493
MCInst NewInst;
494-
std::unique_lock<std::shared_timed_mutex> Lock(BC.CtxMutex);
494+
std::unique_lock<llvm::sys::RWMutex> Lock(BC.CtxMutex);
495495
BC.MIB->createUncondBranch(NewInst, Successor->getLabel(), BC.Ctx.get());
496496
Instructions.emplace_back(std::move(NewInst));
497497
}

bolt/lib/Core/BinaryContext.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,9 +1316,8 @@ void BinaryContext::foldFunction(BinaryFunction &ChildBF,
13161316
assert(!ChildBF.isMultiEntry() && !ParentBF.isMultiEntry() &&
13171317
"cannot merge functions with multiple entry points");
13181318

1319-
std::unique_lock<std::shared_timed_mutex> WriteCtxLock(CtxMutex,
1320-
std::defer_lock);
1321-
std::unique_lock<std::shared_timed_mutex> WriteSymbolMapLock(
1319+
std::unique_lock<llvm::sys::RWMutex> WriteCtxLock(CtxMutex, std::defer_lock);
1320+
std::unique_lock<llvm::sys::RWMutex> WriteSymbolMapLock(
13221321
SymbolToFunctionMapMutex, std::defer_lock);
13231322

13241323
const StringRef ChildName = ChildBF.getOneName();
@@ -1343,10 +1342,10 @@ void BinaryContext::foldFunction(BinaryFunction &ChildBF,
13431342
// continue to exist and either one can be executed.
13441343
ChildBF.mergeProfileDataInto(ParentBF);
13451344

1346-
std::shared_lock<std::shared_timed_mutex> ReadBfsLock(BinaryFunctionsMutex,
1347-
std::defer_lock);
1348-
std::unique_lock<std::shared_timed_mutex> WriteBfsLock(BinaryFunctionsMutex,
1349-
std::defer_lock);
1345+
std::shared_lock<llvm::sys::RWMutex> ReadBfsLock(BinaryFunctionsMutex,
1346+
std::defer_lock);
1347+
std::unique_lock<llvm::sys::RWMutex> WriteBfsLock(BinaryFunctionsMutex,
1348+
std::defer_lock);
13501349
// Remove ChildBF from the global set of functions in relocs mode.
13511350
ReadBfsLock.lock();
13521351
auto FI = BinaryFunctions.find(ChildBF.getAddress());
@@ -2157,7 +2156,7 @@ void BinaryContext::markAmbiguousRelocations(BinaryData &BD,
21572156

21582157
BinaryFunction *BinaryContext::getFunctionForSymbol(const MCSymbol *Symbol,
21592158
uint64_t *EntryDesc) {
2160-
std::shared_lock<std::shared_timed_mutex> Lock(SymbolToFunctionMapMutex);
2159+
std::shared_lock<llvm::sys::RWMutex> Lock(SymbolToFunctionMapMutex);
21612160
auto BFI = SymbolToFunctionMap.find(Symbol);
21622161
if (BFI == SymbolToFunctionMap.end())
21632162
return nullptr;

bolt/lib/Core/BinaryEmitter.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -300,18 +300,16 @@ bool BinaryEmitter::emitFunction(BinaryFunction &Function,
300300
// Set section alignment to at least maximum possible object alignment.
301301
// We need this to support LongJmp and other passes that calculates
302302
// tentative layout.
303-
if (Section->getAlignment() < opts::AlignFunctions)
304-
Section->setAlignment(Align(opts::AlignFunctions));
303+
Section->ensureMinAlignment(Align(opts::AlignFunctions));
305304

306-
Streamer.emitCodeAlignment(BinaryFunction::MinAlign, &*BC.STI);
305+
Streamer.emitCodeAlignment(Align(BinaryFunction::MinAlign), &*BC.STI);
307306
uint16_t MaxAlignBytes = FF.isSplitFragment()
308307
? Function.getMaxColdAlignmentBytes()
309308
: Function.getMaxAlignmentBytes();
310309
if (MaxAlignBytes > 0)
311-
Streamer.emitCodeAlignment(Function.getAlignment(), &*BC.STI,
312-
MaxAlignBytes);
310+
Streamer.emitCodeAlignment(Function.getAlign(), &*BC.STI, MaxAlignBytes);
313311
} else {
314-
Streamer.emitCodeAlignment(Function.getAlignment(), &*BC.STI);
312+
Streamer.emitCodeAlignment(Function.getAlign(), &*BC.STI);
315313
}
316314

317315
MCContext &Context = Streamer.getContext();
@@ -427,7 +425,7 @@ void BinaryEmitter::emitFunctionBody(BinaryFunction &BF, FunctionFragment &FF,
427425
for (BinaryBasicBlock *const BB : FF) {
428426
if ((opts::AlignBlocks || opts::PreserveBlocksAlignment) &&
429427
BB->getAlignment() > 1)
430-
Streamer.emitCodeAlignment(BB->getAlignment(), &*BC.STI,
428+
Streamer.emitCodeAlignment(BB->getAlign(), &*BC.STI,
431429
BB->getAlignmentMaxBytes());
432430
Streamer.emitLabel(BB->getLabel());
433431
if (!EmitCodeOnly) {
@@ -516,7 +514,7 @@ void BinaryEmitter::emitConstantIslands(BinaryFunction &BF, bool EmitColdPart,
516514
const uint16_t Alignment = OnBehalfOf
517515
? OnBehalfOf->getConstantIslandAlignment()
518516
: BF.getConstantIslandAlignment();
519-
Streamer.emitCodeAlignment(Alignment, &*BC.STI);
517+
Streamer.emitCodeAlignment(Align(Alignment), &*BC.STI);
520518

521519
if (!OnBehalfOf) {
522520
if (!EmitColdPart)
@@ -796,7 +794,7 @@ void BinaryEmitter::emitJumpTable(const JumpTable &JT, MCSection *HotSection,
796794
LabelCounts[CurrentLabel] = CurrentLabelCount;
797795
} else {
798796
Streamer.switchSection(JT.Count > 0 ? HotSection : ColdSection);
799-
Streamer.emitValueToAlignment(JT.EntrySize);
797+
Streamer.emitValueToAlignment(Align(JT.EntrySize));
800798
}
801799
MCSymbol *LastLabel = nullptr;
802800
uint64_t Offset = 0;
@@ -816,7 +814,7 @@ void BinaryEmitter::emitJumpTable(const JumpTable &JT, MCSection *HotSection,
816814
Streamer.switchSection(HotSection);
817815
else
818816
Streamer.switchSection(ColdSection);
819-
Streamer.emitValueToAlignment(JT.EntrySize);
817+
Streamer.emitValueToAlignment(Align(JT.EntrySize));
820818
}
821819
// Emit all labels registered at the address of this jump table
822820
// to sync with our global symbol table. We may have two labels
@@ -926,7 +924,7 @@ void BinaryEmitter::emitLSDA(BinaryFunction &BF, const FunctionFragment &FF) {
926924
const uint16_t TTypeAlignment = 4;
927925

928926
// Type tables have to be aligned at 4 bytes.
929-
Streamer.emitValueToAlignment(TTypeAlignment);
927+
Streamer.emitValueToAlignment(Align(TTypeAlignment));
930928

931929
// Emit the LSDA label.
932930
MCSymbol *LSDASymbol = BF.getLSDASymbol(FF.getFragmentNum());

bolt/lib/Core/BinarySection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void BinarySection::emitAsData(MCStreamer &Streamer,
7474
BC.Ctx->getELFSection(SectionName, getELFType(), getELFFlags());
7575

7676
Streamer.switchSection(ELFSection);
77-
Streamer.emitValueToAlignment(getAlignment());
77+
Streamer.emitValueToAlignment(getAlign());
7878

7979
if (BC.HasRelocations && opts::HotData && isReordered())
8080
Streamer.emitLabel(BC.Ctx->getOrCreateSymbol("__hot_data_start"));

bolt/lib/Core/Exceptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ void BinaryFunction::updateEHRanges() {
406406
const MCSymbol *EHSymbol;
407407
MCInst EHLabel;
408408
{
409-
std::unique_lock<std::shared_timed_mutex> Lock(BC.CtxMutex);
409+
std::unique_lock<llvm::sys::RWMutex> Lock(BC.CtxMutex);
410410
EHSymbol = BC.Ctx->createNamedTempSymbol("EH");
411411
BC.MIB->createEHLabel(EHLabel, EHSymbol, BC.Ctx.get());
412412
}

bolt/lib/Core/ParallelUtilities.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#include "bolt/Core/ParallelUtilities.h"
1414
#include "bolt/Core/BinaryContext.h"
1515
#include "bolt/Core/BinaryFunction.h"
16+
#include "llvm/Support/RWMutex.h"
1617
#include "llvm/Support/ThreadPool.h"
1718
#include "llvm/Support/Timer.h"
1819
#include <mutex>
19-
#include <shared_mutex>
2020

2121
#define DEBUG_TYPE "par-utils"
2222

@@ -170,13 +170,13 @@ void runOnEachFunctionWithUniqueAllocId(
170170
if (BC.getBinaryFunctions().size() == 0)
171171
return;
172172

173-
std::shared_timed_mutex MainLock;
173+
llvm::sys::RWMutex MainLock;
174174
auto runBlock = [&](std::map<uint64_t, BinaryFunction>::iterator BlockBegin,
175175
std::map<uint64_t, BinaryFunction>::iterator BlockEnd,
176176
MCPlusBuilder::AllocatorIdTy AllocId) {
177177
Timer T(LogName, LogName);
178178
LLVM_DEBUG(T.startTimer());
179-
std::shared_lock<std::shared_timed_mutex> Lock(MainLock);
179+
std::shared_lock<llvm::sys::RWMutex> Lock(MainLock);
180180
for (auto It = BlockBegin; It != BlockEnd; ++It) {
181181
BinaryFunction &BF = It->second;
182182
if (SkipPredicate && SkipPredicate(BF))
@@ -192,7 +192,7 @@ void runOnEachFunctionWithUniqueAllocId(
192192
return;
193193
}
194194
// This lock is used to postpone task execution
195-
std::unique_lock<std::shared_timed_mutex> Lock(MainLock);
195+
std::unique_lock<llvm::sys::RWMutex> Lock(MainLock);
196196

197197
// Estimate the overall runtime cost using the scheduling policy
198198
const unsigned TotalCost = estimateTotalCost(BC, SkipPredicate, SchedPolicy);

bolt/lib/Passes/Aligner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void AlignerPass::alignBlocks(BinaryFunction &Function,
143143

144144
// Update stats.
145145
LLVM_DEBUG(
146-
std::unique_lock<std::shared_timed_mutex> Lock(AlignHistogramMtx);
146+
std::unique_lock<llvm::sys::RWMutex> Lock(AlignHistogramMtx);
147147
AlignHistogram[BytesToUse]++;
148148
AlignedBlocksCount += BB->getKnownExecutionCount();
149149
);

bolt/lib/Passes/Instrumentation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "bolt/RuntimeLibs/InstrumentationRuntimeLibrary.h"
1616
#include "bolt/Utils/Utils.h"
1717
#include "llvm/Support/CommandLine.h"
18+
#include "llvm/Support/RWMutex.h"
1819
#include <stack>
1920

2021
#define DEBUG_TYPE "bolt-instrumentation"
@@ -298,7 +299,7 @@ void Instrumentation::instrumentFunction(BinaryFunction &Function,
298299

299300
FunctionDescription *FuncDesc = nullptr;
300301
{
301-
std::unique_lock<std::shared_timed_mutex> L(FDMutex);
302+
std::unique_lock<llvm::sys::RWMutex> L(FDMutex);
302303
Summary->FunctionDescriptions.emplace_back();
303304
FuncDesc = &Summary->FunctionDescriptions.back();
304305
}

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2233,7 +2233,7 @@ DataAggregator::writeAggregatedFile(StringRef OutputFilename) const {
22332233
OutFile << "boltedcollection\n";
22342234
if (opts::BasicAggregation) {
22352235
OutFile << "no_lbr";
2236-
for (const StringMapEntry<NoneType> &Entry : EventNames)
2236+
for (const StringMapEntry<std::nullopt_t> &Entry : EventNames)
22372237
OutFile << " " << Entry.getKey();
22382238
OutFile << "\n";
22392239

bolt/lib/Profile/YAMLProfileWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ std::error_code YAMLProfileWriter::writeProfile(const RewriteInstance &RI) {
161161
StringSet<> EventNames = RI.getProfileReader()->getEventNames();
162162
if (!EventNames.empty()) {
163163
std::string Sep;
164-
for (const StringMapEntry<NoneType> &EventEntry : EventNames) {
164+
for (const StringMapEntry<std::nullopt_t> &EventEntry : EventNames) {
165165
BP.Header.EventNames += Sep + EventEntry.first().str();
166166
Sep = ",";
167167
}

bolt/test/AArch64/asm-func-debug.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
#
44
# The input test case foo() contains nops that we remove.
55

6-
RUN: %clang %cflags -no-pie -gdwarf-4 %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
6+
RUN: %clang %cflags -gdwarf-5 -no-pie %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
77
RUN: llvm-bolt %t.exe -o %t --update-debug-sections
88
RUN: llvm-dwarfdump -all %t | FileCheck %s
99

1010
# Check ranges were created/updated for asm compile unit
11-
CHECK: 0x0000000b: DW_TAG_compile_unit
11+
CHECK: 0x0000000c: DW_TAG_compile_unit
1212
CHECK-NEXT: DW_AT_stmt_list (0x00000000)
1313
CHECK-NEXT: DW_AT_low_pc (0x0000000000000000)
1414
CHECK-NEXT: DW_AT_ranges
@@ -22,5 +22,5 @@ CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, versi
2222
CHECK-NEXT: [0x0000000000[[#ADDR]], 0x0000000000[[#ADDR+4]])
2323

2424
# Check line number info was updated
25-
CHECK: 0x0000000000[[#ADDR]] 13 0 1 0 0 is_stmt
26-
CHECK-NEXT: 0x0000000000[[#ADDR+4]] 13 0 1 0 0 is_stmt end_sequence
25+
CHECK: 0x0000000000[[#ADDR]] 13 0 0 0 0 is_stmt
26+
CHECK-NEXT: 0x0000000000[[#ADDR+4]] 13 0 0 0 0 is_stmt end_sequence

bolt/test/X86/asm-func-debug.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
#
44
# The input test case foo() contains nops that we remove.
55

6-
RUN: %clang -gdwarf-4 %cflags -no-pie %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
6+
RUN: %clang %cflags -gdwarf-5 -no-pie %p/../Inputs/asm_foo.s %p/../Inputs/asm_main.c -o %t.exe
77
RUN: llvm-bolt %t.exe -o %t --update-debug-sections
88
RUN: llvm-dwarfdump -all %t | FileCheck %s
99

1010
# Check ranges were created/updated for asm compile unit
11-
CHECK: 0x0000000b: DW_TAG_compile_unit
11+
CHECK: 0x0000000c: DW_TAG_compile_unit
1212
CHECK-NEXT: DW_AT_stmt_list (0x00000000)
1313
CHECK-NEXT: DW_AT_low_pc (0x0000000000000000)
1414
CHECK-NEXT: DW_AT_ranges
@@ -22,5 +22,5 @@ CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, versi
2222
CHECK-NEXT: [0x0000000000[[#ADDR]], 0x0000000000[[#ADDR+1]])
2323

2424
# Check line number info was updated
25-
CHECK: 0x0000000000[[#ADDR]] 13 0 1 0 0 is_stmt
26-
CHECK-NEXT: 0x0000000000[[#ADDR+1]] 13 0 1 0 0 is_stmt end_sequence
25+
CHECK: 0x0000000000[[#ADDR]] 13 0 0 0 0 is_stmt
26+
CHECK-NEXT: 0x0000000000[[#ADDR+1]] 13 0 0 0 0 is_stmt end_sequence

0 commit comments

Comments
 (0)