Skip to content

Commit a988320

Browse files
authored
Merge branch 'main' into ref-test-clang-intrinsic
2 parents f3034bd + f6e70c7 commit a988320

File tree

534 files changed

+22713
-11419
lines changed

Some content is hidden

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

534 files changed

+22713
-11419
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@
120120
/mlir/**/Index* @mogball
121121

122122
# MLIR Python Bindings
123-
/mlir/test/python/ @ftynse @makslevental @stellaraccident
124-
/mlir/python/ @ftynse @makslevental @stellaraccident
123+
/mlir/test/python/ @ftynse @makslevental @stellaraccident @rolfmorel
124+
/mlir/python/ @ftynse @makslevental @stellaraccident @rolfmorel
125+
/mlir/lib/Bindings/Python @makslevental @rolfmorel
125126

126127
# MLIR Mem2Reg/SROA
127128
/mlir/**/Transforms/Mem2Reg.* @moxinilian

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ RUN apt-get update && \
5858
python3-psutil \
5959
sudo \
6060
# These are needed by the premerge pipeline. Pip is used to install
61-
# dependent python packages and ccache is used for build caching. File and
62-
# tzdata are used for tests.
61+
# dependent python packages. File and tzdata are used for tests.
6362
python3-pip \
64-
ccache \
6563
file \
6664
tzdata && \
6765
apt-get clean && \

.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'

.github/workflows/release-asset-audit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ jobs:
2222
runs-on: ubuntu-24.04
2323
if: github.repository == 'llvm/llvm-project'
2424
steps:
25-
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 #v4.1.6
25+
- name: Checkout LLVM
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
with:
28+
sparse-checkout: |
29+
.github/workflows/release-asset-audit.py
30+
llvm/utils/git/requirements.txt
2631
- name: "Run Audit Script"
2732
env:
2833
GITHUB_TOKEN: ${{ github.token }}

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -906,11 +906,10 @@ DataAggregator::getFallthroughsInTrace(BinaryFunction &BF, const Trace &Trace,
906906
if (BF.isPseudo())
907907
return Branches;
908908

909-
if (!BF.isSimple())
909+
// Can only record traces in CFG state
910+
if (!BF.hasCFG())
910911
return std::nullopt;
911912

912-
assert(BF.hasCFG() && "can only record traces in CFG state");
913-
914913
const BinaryBasicBlock *FromBB = BF.getBasicBlockContainingOffset(From);
915914
const BinaryBasicBlock *ToBB = BF.getBasicBlockContainingOffset(To);
916915

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -714,21 +714,6 @@ Error RewriteInstance::run() {
714714

715715
preprocessProfileData();
716716

717-
// Skip disassembling if we have a translation table and we are running an
718-
// aggregation job.
719-
if (opts::AggregateOnly && BAT->enabledFor(InputFile)) {
720-
// YAML profile in BAT mode requires CFG for .bolt.org.text functions
721-
if (!opts::SaveProfile.empty() ||
722-
opts::ProfileFormat == opts::ProfileFormatKind::PF_YAML) {
723-
selectFunctionsToProcess();
724-
disassembleFunctions();
725-
processMetadataPreCFG();
726-
buildFunctionsCFG();
727-
}
728-
processProfileData();
729-
return Error::success();
730-
}
731-
732717
selectFunctionsToProcess();
733718

734719
readDebugInfo();

bolt/test/X86/unclaimed-jt-entries.s

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818

1919
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
2020
# RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q
21+
22+
## Check that non-simple function profile is emitted in perf2bolt mode
23+
# RUN: link_fdata %s %t.exe %t.pa PREAGG
24+
# RUN: llvm-strip -N L5 -N L5_ret %t.exe
25+
# RUN: perf2bolt %t.exe -p %t.pa --pa -o %t.fdata -strict=0 -print-profile \
26+
# RUN: -print-only=main | FileCheck %s --check-prefix=CHECK-P2B
27+
# CHECK-P2B: PERF2BOLT: traces mismatching disassembled function contents: 0
28+
# CHECK-P2B: Binary Function "main"
29+
# CHECK-P2B: IsSimple : 0
30+
# RUN: FileCheck %s --input-file %t.fdata --check-prefix=CHECK-FDATA
31+
# CHECK-FDATA: 1 main 0 1 main 7 0 1
32+
2133
# RUN: llvm-bolt %t.exe -v=1 -o %t.out 2>&1 | FileCheck %s
2234

2335
# CHECK: BOLT-WARNING: unclaimed data to code reference (possibly an unrecognized jump table entry) to .Ltmp[[#]] in main
@@ -33,8 +45,10 @@
3345
.size main, .Lend-main
3446
main:
3547
jmp *L4-24(,%rdi,8)
36-
.L5:
48+
# PREAGG: T #main# #L5# #L5_ret# 1
49+
L5:
3750
movl $4, %eax
51+
L5_ret:
3852
ret
3953
.L9:
4054
movl $2, %eax
@@ -58,7 +72,7 @@ L4:
5872
.quad .L3
5973
.quad .L6
6074
.quad .L3
61-
.quad .L5
75+
.quad L5
6276
.quad .L3
6377
.quad .L3
6478
.quad .L3

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

Lines changed: 23 additions & 9 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

@@ -147,19 +161,19 @@ static Object serializeComment(const CommentInfo &I, Object &Description) {
147161
Child.insert({"ParamName", I.ParamName});
148162
Child.insert({"Direction", I.Direction});
149163
Child.insert({"Explicit", I.Explicit});
150-
Child.insert({"Children", ChildArr});
151-
Obj.insert({commentKindToString(I.Kind), ChildVal});
164+
auto TextCommentsArray = extractTextComments(CARef.front().getAsObject());
165+
Child.insert({"Children", TextCommentsArray});
166+
if (I.Kind == CommentKind::CK_ParamCommandComment)
167+
insertComment(Description, ChildVal, "ParamComments");
152168
return Obj;
153169
}
154170

155171
case CommentKind::CK_VerbatimBlockComment: {
156-
Child.insert({"Text", I.Text});
157-
if (!I.CloseName.empty())
158-
Child.insert({"CloseName", I.CloseName});
159-
Child.insert({"Children", ChildArr});
160-
if (I.CloseName == "endcode")
161-
insertComment(Description, ChildVal, "CodeComments");
162-
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")
163177
insertComment(Description, ChildVal, "VerbatimComments");
164178
return Obj;
165179
}

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+
}

clang-tools-extra/clang-doc/assets/comment-template.mustache

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,36 @@
2424
{{>Comments}}
2525
{{/Children}}
2626
{{/ParagraphComment}}
27+
{{#HasParamComments}}
28+
<h3>Parameters</h3>
29+
{{#ParamComments}}
30+
<div>
31+
<b>{{ParamName}}</b> {{#Explicit}}{{Direction}}{{/Explicit}} {{#Children}}{{>Comments}}{{/Children}}
32+
</div>
33+
{{/ParamComments}}
34+
{{/HasParamComments}}
35+
{{#HasReturnComments}}
36+
<h3>Returns</h3>
37+
{{#ReturnComments}}
38+
{{#.}}
39+
<p>{{TextComment}}</p>
40+
{{/.}}
41+
{{/ReturnComments}}
42+
{{/HasReturnComments}}
43+
{{#HasCodeComments}}
44+
<h3>Code</h3>
45+
{{#CodeComments}}
46+
<div>
47+
<pre class="code-block">
48+
<code>
49+
{{#.}}
50+
{{.}}
51+
{{/.}}
52+
</code>
53+
</pre>
54+
</div>
55+
{{/CodeComments}}
56+
{{/HasCodeComments}}
2757
{{#BlockCommandComment}}
2858
<div class="block-command-comment__command">
2959
<div class="block-command-command">

0 commit comments

Comments
 (0)