Skip to content

Commit 5bbf53d

Browse files
authored
Merge branch 'main' into users/ccc/clang-tidy/query-check
2 parents b56c07c + 2da4ce8 commit 5bbf53d

File tree

5,244 files changed

+336784
-288217
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,244 files changed

+336784
-288217
lines changed

.ci/compute-projects.sh

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ function compute-projects-to-test() {
1818
shift
1919
projects=${@}
2020
for project in ${projects}; do
21+
echo "${project}"
2122
case ${project} in
2223
lld)
23-
for p in lld bolt cross-project-tests; do
24+
for p in bolt cross-project-tests; do
2425
echo $p
2526
done
2627
;;
2728
llvm)
28-
for p in llvm bolt clang clang-tools-extra lld lldb mlir polly; do
29+
for p in bolt clang clang-tools-extra lld lldb mlir polly; do
2930
echo $p
3031
done
3132
# Flang is not stable in Windows CI at the moment
@@ -35,30 +36,21 @@ function compute-projects-to-test() {
3536
;;
3637
clang)
3738
# lldb is temporarily removed to alleviate Linux pre-commit CI waiting times
38-
for p in clang clang-tools-extra compiler-rt cross-project-tests; do
39+
for p in clang-tools-extra compiler-rt cross-project-tests; do
3940
echo $p
4041
done
4142
;;
4243
clang-tools-extra)
43-
for p in clang-tools-extra libc; do
44-
echo $p
45-
done
44+
echo libc
4645
;;
4746
mlir)
48-
echo mlir
49-
# Flang is not stable in Windows CI at the moment
50-
if [[ $isForWindows == 0 ]]; then
51-
echo flang
52-
fi
53-
;;
54-
flang-rt)
5547
# Flang is not stable in Windows CI at the moment
5648
if [[ $isForWindows == 0 ]]; then
5749
echo flang
5850
fi
5951
;;
6052
*)
61-
echo "${project}"
53+
# Nothing to do
6254
;;
6355
esac
6456
done
@@ -73,11 +65,6 @@ function compute-runtimes-to-test() {
7365
echo $p
7466
done
7567
;;
76-
flang)
77-
for p in flang-rt; do
78-
echo $p
79-
done
80-
;;
8168
*)
8269
# Nothing to do
8370
;;

.ci/generate-buildkite-pipeline-premerge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fi
7373
# needs while letting them run on the infrastructure provided by LLVM.
7474

7575
# Figure out which projects need to be built on each platform
76-
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang flang-rt libc libclc lld lldb llvm mlir openmp polly pstl"
76+
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
7777
modified_projects="$(keep-modified-projects ${all_projects})"
7878

7979
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))

.ci/metrics/metrics.py

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# This means we essentially have a list of workflows sorted by creation date,
4444
# and that's all we can deduce from it. So for each iteration, we'll blindly
4545
# process the last N workflows.
46-
GITHUB_WORKFLOWS_MAX_PROCESS_COUNT = 1000
46+
GITHUB_WORKFLOWS_MAX_PROCESS_COUNT = 2000
4747
# Second reason for the cut: reaching a workflow older than X.
4848
# This means we will miss long-tails (exceptional jobs running for more than
4949
# X hours), but that's also the case with the count cutoff above.
@@ -215,25 +215,14 @@ def buildkite_get_metrics(
215215
if job["name"] not in BUILDKITE_WORKFLOW_TO_TRACK:
216216
continue
217217

218+
# Don't count canceled jobs.
219+
if job["canceled_at"]:
220+
continue
221+
218222
created_at = dateutil.parser.isoparse(job["created_at"])
219-
scheduled_at = (
220-
created_at
221-
if job["scheduled_at"] is None
222-
else dateutil.parser.isoparse(job["scheduled_at"])
223-
)
224-
started_at = (
225-
scheduled_at
226-
if job["started_at"] is None
227-
else dateutil.parser.isoparse(job["started_at"])
228-
)
229-
if job["canceled_at"] is None:
230-
finished_at = (
231-
started_at
232-
if job["finished_at"] is None
233-
else dateutil.parser.isoparse(job["finished_at"])
234-
)
235-
else:
236-
finished_at = dateutil.parser.isoparse(job["canceled_at"])
223+
scheduled_at = dateutil.parser.isoparse(job["scheduled_at"])
224+
started_at = dateutil.parser.isoparse(job["started_at"])
225+
finished_at = dateutil.parser.isoparse(job["finished_at"])
237226

238227
job_name = BUILDKITE_WORKFLOW_TO_TRACK[job["name"]]
239228
queue_time = (started_at - scheduled_at).seconds

.ci/monolithic-linux.sh

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
6565
-D CMAKE_CXX_FLAGS=-gmlt \
6666
-D LLVM_CCACHE_BUILD=ON \
6767
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
68-
-D FLANG_ENABLE_FLANG_RT=OFF \
6968
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
7069

7170
echo "--- ninja"
@@ -91,35 +90,12 @@ if [[ "${runtimes}" != "" ]]; then
9190
INSTALL_DIR="${BUILD_DIR}/install"
9291
mkdir -p ${RUNTIMES_BUILD_DIR}
9392

94-
echo "--- cmake runtimes C++03"
95-
96-
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
97-
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
98-
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
99-
-D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \
100-
-D CMAKE_Fortran_COMPILER_WORKS=ON \
101-
-D LLVM_BINARY_DIR="${BUILD_DIR}" \
102-
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
103-
-D LIBCXX_CXX_ABI=libcxxabi \
104-
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
105-
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
106-
-D LIBCXX_TEST_PARAMS="std=c++03" \
107-
-D LIBCXXABI_TEST_PARAMS="std=c++03" \
108-
-D LLVM_LIT_ARGS="${lit_args}"
109-
110-
echo "--- ninja runtimes C++03"
111-
112-
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
113-
11493
echo "--- cmake runtimes C++26"
11594

11695
rm -rf "${RUNTIMES_BUILD_DIR}"
11796
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
11897
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
11998
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
120-
-D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \
121-
-D CMAKE_Fortran_COMPILER_WORKS=ON \
122-
-D LLVM_BINARY_DIR="${BUILD_DIR}" \
12399
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
124100
-D LIBCXX_CXX_ABI=libcxxabi \
125101
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -134,13 +110,14 @@ if [[ "${runtimes}" != "" ]]; then
134110

135111
echo "--- cmake runtimes clang modules"
136112

137-
rm -rf "${RUNTIMES_BUILD_DIR}"
113+
# We don't need to do a clean build of runtimes, because LIBCXX_TEST_PARAMS
114+
# and LIBCXXABI_TEST_PARAMS only affect lit configuration, which successfully
115+
# propagates without a clean build. Other that those two variables, builds
116+
# are supposed to be the same.
117+
138118
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
139119
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
140120
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
141-
-D CMAKE_Fortran_COMPILER="${BUILD_DIR}/bin/flang" \
142-
-D CMAKE_Fortran_COMPILER_WORKS=ON \
143-
-D LLVM_BINARY_DIR="${BUILD_DIR}" \
144121
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
145122
-D LIBCXX_CXX_ABI=libcxxabi \
146123
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -150,6 +127,6 @@ if [[ "${runtimes}" != "" ]]; then
150127
-D LLVM_LIT_ARGS="${lit_args}"
151128

152129
echo "--- ninja runtimes clang modules"
153-
130+
154131
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
155132
fi

.github/workflows/build-ci-container.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
# The arch names should match the names used on dockerhub.
2828
# See https://github.com/docker-library/official-images#architectures-other-than-amd64
2929
- arch: amd64
30-
runs-on: depot-ubuntu-22.04-16
30+
runs-on: depot-ubuntu-24.04-16
3131
- arch: arm64v8
32-
runs-on: depot-ubuntu-22.04-arm-16
32+
runs-on: depot-ubuntu-24.04-arm-16
3333
steps:
3434
- name: Checkout LLVM
3535
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/commit-access-greeter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
if: >-
1616
github.repository_owner == 'llvm' &&
1717
github.event.label.name == 'infra:commit-access-request'
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-24.04
1919
steps:
2020
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2121
with:

.github/workflows/commit-access-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
jobs:
1313
commit-access-review:
1414
if: github.repository_owner == 'llvm'
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
steps:
1717
- name: Fetch LLVM sources
1818
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/issue-write.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: 'Comment on PR'
4141
if: steps.download-artifact.outputs.artifact-id != ''
42-
uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
42+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
4343
with:
4444
github-token: ${{ secrets.GITHUB_TOKEN }}
4545
script: |
@@ -49,7 +49,7 @@ jobs:
4949
return;
5050
}
5151
52-
let runInfo = await github.actions.getWorkflowRun({
52+
let runInfo = await github.rest.actions.getWorkflowRun({
5353
owner: context.repo.owner,
5454
repo: context.repo.repo,
5555
run_id: context.payload.workflow_run.id
@@ -122,7 +122,7 @@ jobs:
122122
// Security check: Ensure that this comment was created by
123123
// the github-actions bot, so a malicious input won't overwrite
124124
// a user's comment.
125-
github.issues.getComment({
125+
github.rest.issues.getComment({
126126
owner: context.repo.owner,
127127
repo: context.repo.repo,
128128
comment_id: comment.id
@@ -132,7 +132,7 @@ jobs:
132132
console.log("Invalid comment id: " + comment.id);
133133
return;
134134
}
135-
github.issues.updateComment({
135+
github.rest.issues.updateComment({
136136
owner: context.repo.owner,
137137
repo: context.repo.repo,
138138
issue_number: pr_number,
@@ -141,7 +141,7 @@ jobs:
141141
});
142142
});
143143
} else {
144-
github.issues.createComment({
144+
github.rest.issues.createComment({
145145
owner: context.repo.owner,
146146
repo: context.repo.repo,
147147
issue_number: pr_number,

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

Lines changed: 4 additions & 4 deletions
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:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
40+
container: ghcr.io/llvm/libcxx-linux-builder:b6bb9dc5abd7c6452c13a53fa8949cb259db459b
4141
continue-on-error: false
4242
strategy:
4343
fail-fast: false
@@ -75,7 +75,7 @@ jobs:
7575
stage2:
7676
if: github.repository_owner == 'llvm'
7777
runs-on: libcxx-self-hosted-linux
78-
container: ghcr.io/llvm/libcxx-linux-builder:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
78+
container: ghcr.io/llvm/libcxx-linux-builder:b6bb9dc5abd7c6452c13a53fa8949cb259db459b
7979
needs: [ stage1 ]
8080
continue-on-error: false
8181
strategy:
@@ -137,7 +137,7 @@ jobs:
137137
'generic-hardening-mode-fast',
138138
'generic-hardening-mode-fast-with-abi-breaks',
139139
'generic-merged',
140-
'generic-modules-lsv',
140+
'generic-modules-cxx17-lsv',
141141
'generic-no-exceptions',
142142
'generic-no-experimental',
143143
'generic-no-filesystem',
@@ -167,7 +167,7 @@ jobs:
167167
- config: 'generic-msan'
168168
machine: libcxx-self-hosted-linux
169169
runs-on: ${{ matrix.machine }}
170-
container: ghcr.io/llvm/libcxx-linux-builder:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
170+
container: ghcr.io/llvm/libcxx-linux-builder:b6bb9dc5abd7c6452c13a53fa8949cb259db459b
171171
steps:
172172
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
173173
- name: ${{ matrix.config }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ permissions:
1919
jobs:
2020
audit:
2121
name: "Release Asset Audit"
22-
runs-on: ubuntu-22.04
22+
runs-on: ubuntu-24.04
2323
if: github.repository == 'llvm/llvm-project'
2424
steps:
2525
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 #v4.1.6

.github/workflows/release-binaries-all.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
setup-variables:
5858
if: >-
5959
(github.event_name != 'pull_request' || github.event.action != 'closed')
60-
runs-on: ubuntu-22.04
60+
runs-on: ubuntu-24.04
6161
outputs:
6262
release-version: ${{ steps.vars.outputs.release-version }}
6363
upload: ${{ steps.vars.outputs.upload }}
@@ -85,6 +85,8 @@ jobs:
8585
strategy:
8686
fail-fast: false
8787
matrix:
88+
# We use ubuntu-22.04 rather than the latest version to make the built
89+
# binaries more portable (eg functional aginast older glibc).
8890
runs-on:
8991
- ubuntu-22.04
9092
- ubuntu-22.04-arm

.github/workflows/release-binaries.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on:
1616
description: "Runner to use for the build"
1717
required: true
1818
type: choice
19+
# We use ubuntu-22.04 rather than the latest version to make the built
20+
# binaries more portable (eg functional aginast older glibc).
1921
options:
2022
- ubuntu-22.04
2123
- ubuntu-22.04-arm
@@ -276,7 +278,7 @@ jobs:
276278
if: >-
277279
github.event_name != 'pull_request' &&
278280
needs.prepare.outputs.upload == 'true'
279-
runs-on: ubuntu-22.04
281+
runs-on: ubuntu-24.04
280282
permissions:
281283
contents: write # For release uploads
282284
id-token: write # For artifact attestations

.github/workflows/scorecard.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131

3232
steps:
3333
- name: "Checkout code"
34-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
34+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3535
with:
3636
persist-credentials: false
3737

3838
- name: "Run analysis"
39-
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
39+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
4040
with:
4141
results_file: results.sarif
4242
results_format: sarif
@@ -49,14 +49,14 @@ jobs:
4949
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
5050
# format to the repository Actions tab.
5151
- name: "Upload artifact"
52-
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
52+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
5353
with:
5454
name: SARIF file
5555
path: results.sarif
5656
retention-days: 5
5757

5858
# Upload the results to GitHub's code scanning dashboard.
5959
- name: "Upload to code-scanning"
60-
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
60+
uses: github/codeql-action/upload-sarif@80f993039571a6de66594ecaa432875a6942e8e0 # v2.20.6
6161
with:
6262
sarif_file: results.sarif

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,16 @@ class MCPlusBuilder {
551551
return Analysis->isReturn(Inst);
552552
}
553553

554+
/// Returns the registers that are trusted at function entry.
555+
///
556+
/// Each register should be treated as if a successfully authenticated
557+
/// pointer was written to it before entering the function (i.e. the
558+
/// pointer is safe to jump to as well as to be signed).
559+
virtual SmallVector<MCPhysReg> getTrustedLiveInRegs() const {
560+
llvm_unreachable("not implemented");
561+
return {};
562+
}
563+
554564
virtual ErrorOr<MCPhysReg> getAuthenticatedReg(const MCInst &Inst) const {
555565
llvm_unreachable("not implemented");
556566
return getNoRegister();

0 commit comments

Comments
 (0)