Skip to content

Commit 0e86da4

Browse files
committed
Merge remote-tracking branch 'upstream/main' into gh-101657
2 parents 1071a2c + 7bd8e37 commit 0e86da4

File tree

5,454 files changed

+231419
-133274
lines changed

Some content is hidden

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

5,454 files changed

+231419
-133274
lines changed

.ci/compute_projects_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_flang(self):
147147

148148
def test_invalid_subproject(self):
149149
env_variables = compute_projects.get_env_variables(
150-
[".ci/compute_projects.py"], "Linux"
150+
["third-party/benchmark/CMakeLists.txt"], "Linux"
151151
)
152152
self.assertEqual(env_variables["projects_to_build"], "")
153153
self.assertEqual(env_variables["project_check_targets"], "")
@@ -163,7 +163,7 @@ def test_top_level_file(self):
163163

164164
def test_exclude_runtiems_in_projects(self):
165165
env_variables = compute_projects.get_env_variables(
166-
[".ci/compute_projects.py", "libcxx/CMakeLists.txt"], "Linux"
166+
["libcxx/CMakeLists.txt"], "Linux"
167167
)
168168
self.assertEqual(env_variables["projects_to_build"], "")
169169
self.assertEqual(env_variables["project_check_targets"], "")
@@ -192,10 +192,10 @@ def test_ci(self):
192192
env_variables = compute_projects.get_env_variables(
193193
[".ci/compute_projects.py"], "Linux"
194194
)
195-
self.assertEqual(env_variables["projects_to_build"], "clang;lld;llvm;lldb")
195+
self.assertEqual(env_variables["projects_to_build"], "clang;lld;lldb;llvm")
196196
self.assertEqual(
197197
env_variables["project_check_targets"],
198-
"check-clang check-lld check-llvm check-lldb",
198+
"check-clang check-lld check-lldb check-llvm",
199199
)
200200
self.assertEqual(
201201
env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"

.ci/generate_test_report_lib.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def plural(num_tests):
9292
]
9393
)
9494
elif failures:
95-
report.extend(["", "## Failed Tests", "(click on a test name to see its output)"])
95+
report.extend(
96+
["", "## Failed Tests", "(click on a test name to see its output)"]
97+
)
9698

9799
for testsuite_name, failures in failures.items():
98100
report.extend(["", f"### {testsuite_name}"])
@@ -120,6 +122,17 @@ def plural(num_tests):
120122
]
121123
)
122124

125+
if failures or return_code != 0:
126+
report.extend(
127+
[
128+
"",
129+
"If these failures are unrelated to your changes (for example "
130+
"tests are broken or flaky at HEAD), please open an issue at "
131+
"https://github.com/llvm/llvm-project/issues and add the "
132+
"`infrastructure` label.",
133+
]
134+
)
135+
123136
report = "\n".join(report)
124137
if len(report.encode("utf-8")) > size_limit:
125138
return generate_report(

.ci/generate_test_report_lib_test.py

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ def test_no_failures_build_failed(self):
109109
110110
All tests passed but another part of the build **failed**.
111111
112-
[Download](https://buildkite.com/organizations/organization_slug/pipelines/pipeline_slug/builds/build_number/jobs/job_id/download.txt) the build's log file to see the details."""
112+
[Download](https://buildkite.com/organizations/organization_slug/pipelines/pipeline_slug/builds/build_number/jobs/job_id/download.txt) the build's log file to see the details.
113+
114+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
113115
),
114116
"error",
115117
),
@@ -169,7 +171,9 @@ def test_report_single_file_single_testsuite(self):
169171
```
170172
Other output goes here
171173
```
172-
</details>"""
174+
</details>
175+
176+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
173177
),
174178
"error",
175179
),
@@ -203,7 +207,9 @@ def test_report_single_file_single_testsuite(self):
203207
```
204208
DEF/test_2 output goes here
205209
```
206-
</details>"""
210+
</details>
211+
212+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
207213
),
208214
"error",
209215
)
@@ -311,7 +317,9 @@ def test_report_dont_list_failures(self):
311317
312318
* 1 test failed
313319
314-
Failed tests and their output was too large to report. Download the build's log file to see the details."""
320+
Failed tests and their output was too large to report. Download the build's log file to see the details.
321+
322+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
315323
),
316324
"error",
317325
),
@@ -352,13 +360,16 @@ def test_report_dont_list_failures_link_to_log(self):
352360
353361
* 1 test failed
354362
355-
Failed tests and their output was too large to report. [Download](https://buildkite.com/organizations/organization_slug/pipelines/pipeline_slug/builds/build_number/jobs/job_id/download.txt) the build's log file to see the details."""
363+
Failed tests and their output was too large to report. [Download](https://buildkite.com/organizations/organization_slug/pipelines/pipeline_slug/builds/build_number/jobs/job_id/download.txt) the build's log file to see the details.
364+
365+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
356366
),
357367
"error",
358368
),
359369
)
360370

361371
def test_report_size_limit(self):
372+
test_output = "f" * 1000
362373
self.assertEqual(
363374
generate_test_report_lib.generate_report(
364375
"Foo",
@@ -371,14 +382,16 @@ def test_report_size_limit(self):
371382
<testsuites time="0.02">
372383
<testsuite name="Bar" tests="1" failures="1" skipped="0" time="0.02">
373384
<testcase classname="Bar/test_1" name="test_1" time="0.02">
374-
<failure><![CDATA[Some long output goes here...]]></failure>
385+
<failure><![CDATA[{output}]]></failure>
375386
</testcase>
376387
</testsuite>
377-
</testsuites>"""
388+
</testsuites>""".format(
389+
output=test_output
390+
)
378391
)
379392
)
380393
],
381-
size_limit=128,
394+
size_limit=512,
382395
),
383396
(
384397
dedent(
@@ -387,7 +400,9 @@ def test_report_size_limit(self):
387400
388401
* 1 test failed
389402
390-
Failed tests and their output was too large to report. Download the build's log file to see the details."""
403+
Failed tests and their output was too large to report. Download the build's log file to see the details.
404+
405+
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label."""
391406
),
392407
"error",
393408
),

.ci/metrics/metrics.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
# name.
3030
GITHUB_JOB_TO_TRACK = {
3131
"github_llvm_premerge_checks": {
32-
"Build and Test Linux (Test Only - Please Ignore Results)": "premerge_linux",
33-
"Build and Test Windows (Test Only - Please Ignore Results)": "premerge_windows",
32+
"Build and Test Linux": "premerge_linux",
33+
"Build and Test Windows": "premerge_windows",
3434
}
3535
}
3636

@@ -67,6 +67,7 @@
6767
# remain small.
6868
BUILDKITE_GRAPHQL_BUILDS_PER_PAGE = 50
6969

70+
7071
@dataclass
7172
class JobMetrics:
7273
job_name: str
@@ -77,6 +78,7 @@ class JobMetrics:
7778
workflow_id: int
7879
workflow_name: str
7980

81+
8082
@dataclass
8183
class GaugeMetric:
8284
name: str
@@ -258,6 +260,7 @@ def buildkite_get_metrics(
258260

259261
return output, incomplete_now
260262

263+
261264
def github_get_metrics(
262265
github_repo: github.Repository, last_workflows_seen_as_completed: set[int]
263266
) -> tuple[list[JobMetrics], int]:

.github/new-prs-labeler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,12 +703,19 @@ mlgo:
703703
- llvm/test/CodeGen/MLRegAlloc/**
704704
- llvm/utils/mlgo-utils/**
705705
- llvm/docs/MLGO.rst
706+
- llvm/include/llvm/Analysis/IR2Vec.h
707+
- llvm/lib/Analysis/IR2Vec.cpp
708+
- llvm/lib/Analysis/models/**
709+
- llvm/test/Analysis/IR2Vec/**
706710

707711
tools:llvm-exegesis:
708712
- llvm/tools/llvm-exegesis/**
709713
- llvm/test/tools/llvm-exegesis/**
710714
- llvm/unittests/tools/llvm-exegesis/**
711715

716+
tools:llvm-reduce:
717+
- llvm/tools/llvm-reduce/**
718+
712719
platform:windows:
713720
- lld/COFF/**
714721
- clang/lib/Driver/MSVC.cpp

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

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,33 +39,15 @@ RUN regsvr32 /S "C:\BuildTools\DIA SDK\bin\amd64\msdia140.dll" & \
3939

4040
# install tools as described in https://llvm.org/docs/GettingStartedVS.html
4141
# and a few more that were not documented...
42-
RUN choco install -y ninja git
42+
RUN choco install -y ninja git sccache
4343
# Pin an older version of Python; the current Python 3.10 fails when
4444
# doing "pip install" for the other dependencies, as it fails to find libxml
4545
# while compiling some package.
4646
RUN choco install -y python3 --version 3.9.7
4747

48-
# ActivePerl is currently not installable via Chocolatey, see
49-
# http://disq.us/p/2ipditb. Install StrawberryPerl instead. Unfortunately,
50-
# StrawberryPerl not only installs Perl, but also a redundant C/C++ compiler
51-
# toolchain, and a copy of pkg-config which can cause misdetections for other
52-
# built products, see
53-
# https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/11 for further
54-
# details. Remove the redundant and unnecessary parts of the StrawberryPerl
55-
# install.
56-
RUN choco install -y strawberryperl && \
57-
rmdir /q /s c:\strawberry\c && \
58-
del /q c:\strawberry\perl\bin\pkg-config*
59-
60-
# libcxx requires clang(-cl) to be available
61-
RUN choco install -y sccache llvm
48+
# Testing requires psutil
6249
RUN pip install psutil
6350

64-
RUN curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20230320/llvm-mingw-20230320-ucrt-x86_64.zip && \
65-
powershell Expand-Archive llvm-mingw-*-ucrt-x86_64.zip -DestinationPath . && \
66-
del llvm-mingw-*-ucrt-x86_64.zip && \
67-
ren llvm-mingw-20230320-ucrt-x86_64 llvm-mingw
68-
6951
# configure Python encoding
7052
ENV PYTHONIOENCODING=UTF-8
7153

@@ -103,11 +85,6 @@ RUN powershell -Command \
10385
RUN git config --system core.longpaths true & \
10486
git config --global core.autocrlf false
10587
106-
# handle for debugging of files beeing locked by some processes.
107-
RUN choco install -y handle
108-
109-
RUN pip3 install pywin32 buildbot-worker==2.8.4
110-
11188
ARG RUNNER_VERSION=2.324.0
11289
ENV RUNNER_VERSION=$RUNNER_VERSION
11390

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
stage1:
3838
if: github.repository_owner == 'llvm'
3939
runs-on: libcxx-self-hosted-linux
40-
container: ghcr.io/llvm/libcxx-linux-builder:2b57ebb50b6d418e70382e655feaa619b558e254
40+
container: ghcr.io/llvm/libcxx-linux-builder:b060022103f551d8ca1dad84122ef73927c86512
4141
continue-on-error: false
4242
strategy:
4343
fail-fast: false

.github/workflows/pr-code-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Install clang-format
5656
uses: aminya/setup-cpp@17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
5757
with:
58-
clangformat: 19.1.6
58+
clangformat: 20.1.5
5959

6060
- name: Setup Python env
6161
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0

.github/workflows/premerge.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ on:
1616
- closed
1717
push:
1818
branches:
19-
- 'main'
2019
- 'release/**'
2120

2221
concurrency:
@@ -25,7 +24,7 @@ concurrency:
2524

2625
jobs:
2726
premerge-checks-linux:
28-
name: Build and Test Linux (Test Only - Please Ignore Results)
27+
name: Build and Test Linux
2928
if: >-
3029
github.repository_owner == 'llvm' &&
3130
(github.event_name != 'pull_request' || github.event.action != 'closed')
@@ -43,9 +42,6 @@ jobs:
4342
# Mark the job as a success even if the step fails so that people do
4443
# not get notified while the new premerge pipeline is in an
4544
# experimental state.
46-
# TODO(boomanaiden154): Remove this once the pipeline is stable and we
47-
# are ready for people to start recieving notifications.
48-
continue-on-error: true
4945
run: |
5046
git config --global --add safe.directory '*'
5147
@@ -74,7 +70,7 @@ jobs:
7470
include-hidden-files: 'true'
7571

7672
premerge-checks-windows:
77-
name: Build and Test Windows (Test Only - Please Ignore Results)
73+
name: Build and Test Windows
7874
if: >-
7975
github.repository_owner == 'llvm' &&
8076
(github.event_name != 'pull_request' || github.event.action != 'closed')
@@ -110,9 +106,6 @@ jobs:
110106
# Mark the job as a success even if the step fails so that people do
111107
# not get notified while the new premerge pipeline is in an
112108
# experimental state.
113-
# TODO(boomanaiden154): Remove this once the pipeline is stable and we
114-
# are ready for people to start recieving notifications.
115-
continue-on-error: true
116109
if: ${{ steps.vars.outputs.windows-projects != '' }}
117110
shell: cmd
118111
run: |

bolt/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ if(BOLT_BUILT_STANDALONE)
4646
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
4747
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
4848

49+
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
50+
add_definitions(${LLVM_DEFINITIONS_LIST})
51+
list(APPEND CMAKE_REQUIRED_DEFINITIONS ${LLVM_DEFINITIONS_LIST})
52+
4953
include(AddLLVM)
5054
include(TableGen)
5155
include_directories(${LLVM_INCLUDE_DIRS})

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,19 @@ class BinaryFunction {
804804
return iterator_range<const_cfi_iterator>(cie_begin(), cie_end());
805805
}
806806

807+
/// Iterate over instructions (only if CFG is unavailable or not built yet).
808+
iterator_range<InstrMapType::iterator> instrs() {
809+
assert(!hasCFG() && "Iterate over basic blocks instead");
810+
return make_range(Instructions.begin(), Instructions.end());
811+
}
812+
iterator_range<InstrMapType::const_iterator> instrs() const {
813+
assert(!hasCFG() && "Iterate over basic blocks instead");
814+
return make_range(Instructions.begin(), Instructions.end());
815+
}
816+
817+
/// Returns whether there are any labels at Offset.
818+
bool hasLabelAt(unsigned Offset) const { return Labels.count(Offset) != 0; }
819+
807820
/// Iterate over all jump tables associated with this function.
808821
iterator_range<std::map<uint64_t, JumpTable *>::const_iterator>
809822
jumpTables() const {

0 commit comments

Comments
 (0)