Skip to content

Commit 9e670ae

Browse files
rebase
Created using spr 1.3.6
2 parents f6a9d19 + ebe0480 commit 9e670ae

File tree

1,284 files changed

+43251
-31160
lines changed

Some content is hidden

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

1,284 files changed

+43251
-31160
lines changed

.git-blame-ignore-revs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,40 @@ d33bf2e9df578ff7e44fd22504d6ad5a122b7ee6
106106
ce46adb8b7ce645353eccaedf31ed9765dab77bb
107107
68070f908bb7ac5f0b5fa9722caa504ecf723f6b
108108
5213c57cb1f0d78aad9a253b7f6a2b62ff4c7859
109+
110+
# [mlir] Update create method
111+
9e7834cadf48292b5d127d6d98f9e6d565ed5d9a
112+
284a5c2c0b97edddf255ea210f939203ad3d09f2
113+
c090ed53fb73f59cf221f5610430af8047758117
114+
fcbcfe44cff00101a6a98a73971398eb8dd87710
115+
258daf539583b80e0217d1d87941412d65cf16aa
116+
c610b244937ed847b0275ccb038c0f2d36310b4a
117+
b58ad3650f2195117f484d551ffbada27e7d1e14
118+
258d04c810ab10f101324cbf1fe3c7be65eb1938
119+
a6bf40d1c6cf010b3ad90bf7f410983453f4deb2
120+
dcfc853c51aecf6538182378c016f8e1604e7e97
121+
3f74334c38120bbdefac012d478dfce8e4eb0906
122+
a636b7bfdd1d8304b78e8b42ec900a21736d4afb
123+
75aa7065dcf653de7870758cd502a7c714f4bcd7
124+
2f5312563fd5cb2e355ec49109f3e63875337c7c
125+
967626b842551ecd997c0d10eb68c3015b63a3d7
126+
588845defd09359a8b87db339b563af848cf45a7
127+
b0434925c98c9a8906afea60a1304c870b1f574a
128+
8fff238b2c363b036ce9e7bf7abab3acafc87ab2
129+
38976a03cd367b27437e0d1e81c0ccaee2777b47
130+
eaa67a3cf041009ae33a45159d0465262c3af5dc
131+
b0312be6aa664e4cb9abec6d080e971493093d05
132+
2736fbd8324bf21a130c8abd4bd0e7d3aa840ac1
133+
4ae9fdca8af095afd91705f8dd143e93b304b6fb
134+
f904cdd6c3049e605d24ed17680e80e7133908a0
135+
972ac59c9af4ad47af0b3542ae936b3470727e5f
136+
7b787965431e666858fdf66db25ee5a129833927
137+
c3823af156b517d926a56e3d0d585e2a15720e96
138+
dce6679cf5cbbdaffb9c2b51dc762c5c6689ea78
139+
9844ba6d9740206129b52633c555f767eaa45581
140+
5547c6cd03ddddd405a09e51624e1f19955a85b1
141+
a3a007ad5fa20abc90ead4e1030b481bf109b4cf
142+
46f6df0848ea04449c6179ecdedc404ee5b5cf11
143+
b7e332d3f59f567b1999fbcc660d7837cba8e406
144+
6056f942abe83b05406df8b04e95ec37a3d160b5
145+
906295b8a31c8dac5aa845864c0bca9f02f86184

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,37 @@ jobs:
2121
- os: ubuntu-24.04
2222
build_type: Debug
2323
ccache-variant: sccache
24-
c_compiler: clang-21
25-
cpp_compiler: clang++-21
24+
c_compiler: clang-20
25+
cpp_compiler: clang++-20
2626
target: x86_64-unknown-linux-llvm
2727
include_scudo: ON
2828
- os: ubuntu-24.04
2929
build_type: Release
3030
ccache-variant: sccache
31-
c_compiler: clang-21
32-
cpp_compiler: clang++-21
31+
c_compiler: clang-20
32+
cpp_compiler: clang++-20
3333
target: x86_64-unknown-linux-llvm
3434
include_scudo: ON
3535
- os: ubuntu-24.04
3636
build_type: MinSizeRel
3737
ccache-variant: sccache
38-
c_compiler: clang-21
39-
cpp_compiler: clang++-21
38+
c_compiler: clang-20
39+
cpp_compiler: clang++-20
4040
target: x86_64-unknown-linux-llvm
4141
include_scudo: ON
4242
# TODO: remove ccache logic when https://github.com/hendrikmuhs/ccache-action/issues/279 is resolved.
4343
- os: ubuntu-24.04-arm
4444
build_type: Debug
4545
ccache-variant: ccache
46-
c_compiler: clang-21
47-
cpp_compiler: clang++-21
46+
c_compiler: clang-20
47+
cpp_compiler: clang++-20
4848
target: aarch64-unknown-linux-llvm
4949
include_scudo: ON
5050
- os: ubuntu-24.04
5151
build_type: Debug
5252
ccache-variant: ccache
53-
c_compiler: clang-21
54-
cpp_compiler: clang++-21
53+
c_compiler: clang-20
54+
cpp_compiler: clang++-20
5555
target: x86_64-unknown-uefi-llvm
5656
include_scudo: OFF
5757
# TODO: add back gcc build when it is fixed
@@ -81,7 +81,7 @@ jobs:
8181
run: |
8282
wget https://apt.llvm.org/llvm.sh
8383
chmod +x llvm.sh
84-
sudo ./llvm.sh 21
84+
sudo ./llvm.sh 20
8585
sudo apt-get update
8686
sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build linux-libc-dev
8787
sudo ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm

.github/workflows/libcxx-build-containers.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ on:
1818
- 'libcxx/utils/ci/**'
1919
- '.github/workflows/libcxx-build-containers.yml'
2020
pull_request:
21-
branches:
22-
- main
2321
paths:
2422
- 'libcxx/utils/ci/**'
2523
- '.github/workflows/libcxx-build-containers.yml'

bolt/include/bolt/Profile/DataAggregator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ class DataAggregator : public DataReader {
502502
/// entries).
503503
void imputeFallThroughs();
504504

505+
/// Register profiled functions for lite mode.
506+
void registerProfiledFunctions();
507+
505508
/// Debugging dump methods
506509
void dump() const;
507510
void dump(const PerfBranchSample &Sample) const;

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,26 @@ void DataAggregator::imputeFallThroughs() {
581581
outs() << "BOLT-INFO: imputed " << InferredTraces << " traces\n";
582582
}
583583

584+
void DataAggregator::registerProfiledFunctions() {
585+
DenseSet<uint64_t> Addrs;
586+
for (const auto &Trace : llvm::make_first_range(Traces)) {
587+
if (Trace.Branch != Trace::FT_ONLY &&
588+
Trace.Branch != Trace::FT_EXTERNAL_ORIGIN)
589+
Addrs.insert(Trace.Branch);
590+
Addrs.insert(Trace.From);
591+
}
592+
593+
for (const auto [PC, _] : BasicSamples)
594+
Addrs.insert(PC);
595+
596+
for (const PerfMemSample &MemSample : MemSamples)
597+
Addrs.insert(MemSample.PC);
598+
599+
for (const uint64_t Addr : Addrs)
600+
if (BinaryFunction *Func = getBinaryFunctionContainingAddress(Addr))
601+
Func->setHasProfileAvailable();
602+
}
603+
584604
Error DataAggregator::preprocessProfile(BinaryContext &BC) {
585605
this->BC = &BC;
586606

@@ -603,6 +623,7 @@ Error DataAggregator::preprocessProfile(BinaryContext &BC) {
603623
exit(0);
604624
}
605625

626+
registerProfiledFunctions();
606627
return Error::success();
607628
}
608629

@@ -1347,10 +1368,6 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
13471368
}
13481369

13491370
const uint64_t FromOffset = Addr[0]->Offset;
1350-
BinaryFunction *FromFunc = getBinaryFunctionContainingAddress(FromOffset);
1351-
if (FromFunc)
1352-
FromFunc->setHasProfileAvailable();
1353-
13541371
int64_t Count = Counters[0];
13551372
int64_t Mispreds = Counters[1];
13561373

@@ -1361,11 +1378,6 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
13611378
return std::error_code();
13621379
}
13631380

1364-
const uint64_t ToOffset = Addr[1]->Offset;
1365-
BinaryFunction *ToFunc = getBinaryFunctionContainingAddress(ToOffset);
1366-
if (ToFunc)
1367-
ToFunc->setHasProfileAvailable();
1368-
13691381
/// For fall-through types, adjust locations to match Trace container.
13701382
if (Type == FT || Type == FT_EXTERNAL_ORIGIN || Type == FT_EXTERNAL_RETURN) {
13711383
Addr[2] = Location(Addr[1]->Offset); // Trace To
@@ -1613,9 +1625,6 @@ std::error_code DataAggregator::parseBranchEvents() {
16131625
Traces.reserve(TraceMap.size());
16141626
for (const auto &[Trace, Info] : TraceMap) {
16151627
Traces.emplace_back(Trace, Info);
1616-
for (const uint64_t Addr : {Trace.Branch, Trace.From})
1617-
if (BinaryFunction *BF = getBinaryFunctionContainingAddress(Addr))
1618-
BF->setHasProfileAvailable();
16191628
}
16201629
clear(TraceMap);
16211630

@@ -1676,9 +1685,6 @@ std::error_code DataAggregator::parseBasicEvents() {
16761685
continue;
16771686
++NumTotalSamples;
16781687

1679-
if (BinaryFunction *BF = getBinaryFunctionContainingAddress(Sample->PC))
1680-
BF->setHasProfileAvailable();
1681-
16821688
++BasicSamples[Sample->PC];
16831689
EventNames.insert(Sample->EventName);
16841690
}
@@ -1716,9 +1722,6 @@ std::error_code DataAggregator::parseMemEvents() {
17161722
if (std::error_code EC = Sample.getError())
17171723
return EC;
17181724

1719-
if (BinaryFunction *BF = getBinaryFunctionContainingAddress(Sample->PC))
1720-
BF->setHasProfileAvailable();
1721-
17221725
MemSamples.emplace_back(std::move(Sample.get()));
17231726
}
17241727

bolt/test/X86/debug-fission-single-convert.s

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
# RUN: -nostartfiles \
1515
# RUN: -Wl,--script=%p/Inputs/debug-fission-script.txt \
1616
# RUN: %t.o -o %t.exe
17+
# RUN: mkdir -p %t.dwarf-output
1718
# RUN: llvm-bolt %t.exe \
1819
# RUN: --reorder-blocks=reverse \
1920
# RUN: --update-debug-sections \
20-
# RUN: --dwarf-output-path=%T \
21+
# RUN: --dwarf-output-path=%t.dwarf-output \
2122
# RUN: --always-convert-to-ranges=true \
2223
# RUN: -o %t.bolt.1.exe 2>&1 | FileCheck %s
2324
# RUN: llvm-dwarfdump --show-form --verbose --debug-ranges %t.bolt.1.exe &> %tAddrIndexTest
24-
# RUN: not llvm-dwarfdump --show-form --verbose --debug-info %T/debug-fission-simple-convert.dwo0.dwo >> %tAddrIndexTest
25+
# RUN: not llvm-dwarfdump --show-form --verbose --debug-info %t.dwarf-output/debug-fission-simple-convert.dwo0.dwo >> %tAddrIndexTest
2526
# RUN: cat %tAddrIndexTest | FileCheck %s --check-prefix=CHECK-DWO-DWO
2627
# RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt.1.exe | FileCheck %s --check-prefix=CHECK-ADDR-SEC
2728

bolt/test/X86/debug-fission-single.s

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
# RUN: -nostartfiles \
1515
# RUN: -Wl,--script=%p/Inputs/debug-fission-script.txt \
1616
# RUN: %t.o -o %t.exe
17+
# RUN: mkdir -p %t.dwarf-output
1718
# RUN: llvm-bolt %t.exe \
1819
# RUN: --reorder-blocks=reverse \
1920
# RUN: --update-debug-sections \
20-
# RUN: --dwarf-output-path=%T \
21+
# RUN: --dwarf-output-path=%t.dwarf-output \
2122
# RUN: -o %t.bolt.1.exe 2>&1 | FileCheck %s
2223
# RUN: llvm-dwarfdump --show-form --verbose --debug-ranges %t.bolt.1.exe &> %tAddrIndexTest
23-
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %T/debug-fission-simple.dwo0.dwo >> %tAddrIndexTest
24+
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.dwarf-output/debug-fission-simple.dwo0.dwo >> %tAddrIndexTest
2425
# RUN: cat %tAddrIndexTest | FileCheck %s --check-prefix=CHECK-DWO-DWO
2526
# RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt.1.exe | FileCheck %s --check-prefix=CHECK-ADDR-SEC
2627

bolt/test/X86/inlined-function-mixed.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
## Make sure inlining from a unit with debug info into unit without
22
## debug info does not cause a crash.
33

4-
RUN: %clangxx %cxxflags %S/Inputs/inlined.cpp -c -o %T/inlined.o
5-
RUN: %clangxx %cxxflags %S/Inputs/inlinee.cpp -c -o %T/inlinee.o -g
6-
RUN: %clangxx %cxxflags %T/inlined.o %T/inlinee.o -o %t
4+
RUN: %clangxx %cxxflags %S/Inputs/inlined.cpp -c -o %t.inlined.o
5+
RUN: %clangxx %cxxflags %S/Inputs/inlinee.cpp -c -o %t.inlinee.o -g
6+
RUN: %clangxx %cxxflags %t.inlined.o %t.inlinee.o -o %t
77

88
RUN: llvm-bolt %t -o %t.bolt --update-debug-sections --reorder-blocks=reverse \
99
RUN: --inline-small-functions --force-inline=main | FileCheck %s

clang-tools-extra/clang-doc/JSONGenerator.cpp

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ static json::Value extractTextComments(Object *ParagraphComment) {
103103
return *ParagraphComment->get("Children");
104104
}
105105

106+
static json::Value extractVerbatimComments(json::Array VerbatimLines) {
107+
json::Value TextArray = json::Array();
108+
auto &TextArrayRef = *TextArray.getAsArray();
109+
for (auto &Line : VerbatimLines)
110+
TextArrayRef.push_back(*Line.getAsObject()
111+
->get("VerbatimBlockLineComment")
112+
->getAsObject()
113+
->get("Text"));
114+
115+
return TextArray;
116+
}
117+
106118
static Object serializeComment(const CommentInfo &I, Object &Description) {
107119
// taken from PR #142273
108120
Object Obj = Object();
@@ -126,6 +138,8 @@ static Object serializeComment(const CommentInfo &I, Object &Description) {
126138
auto TextCommentsArray = extractTextComments(CARef.front().getAsObject());
127139
if (I.Name == "brief")
128140
insertComment(Description, TextCommentsArray, "BriefComments");
141+
else if (I.Name == "return")
142+
insertComment(Description, TextCommentsArray, "ReturnComments");
129143
return Obj;
130144
}
131145

@@ -155,13 +169,11 @@ static Object serializeComment(const CommentInfo &I, Object &Description) {
155169
}
156170

157171
case CommentKind::CK_VerbatimBlockComment: {
158-
Child.insert({"Text", I.Text});
159-
if (!I.CloseName.empty())
160-
Child.insert({"CloseName", I.CloseName});
161-
Child.insert({"Children", ChildArr});
162-
if (I.CloseName == "endcode")
163-
insertComment(Description, ChildVal, "CodeComments");
164-
else if (I.CloseName == "endverbatim")
172+
if (I.CloseName == "endcode") {
173+
// We don't support \code language specification
174+
auto TextCommentsArray = extractVerbatimComments(CARef);
175+
insertComment(Description, TextCommentsArray, "CodeComments");
176+
} else if (I.CloseName == "endverbatim")
165177
insertComment(Description, ChildVal, "VerbatimComments");
166178
return Obj;
167179
}

clang-tools-extra/clang-doc/assets/clang-doc-mustache.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,3 +469,7 @@ a, a:visited, a:hover, a:active {
469469
text-decoration: none;
470470
color: inherit;
471471
}
472+
473+
.code-block {
474+
white-space: pre-line;
475+
}

0 commit comments

Comments
 (0)