Skip to content

Commit a10b5a1

Browse files
authored
Merge branch 'llvm:main' into implement-jump-to-cursor
2 parents 6624936 + 9269aae commit a10b5a1

File tree

3,690 files changed

+118252
-88128
lines changed

Some content is hidden

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

3,690 files changed

+118252
-88128
lines changed

.ci/metrics/metrics.py

+7-18
Original file line numberDiff line numberDiff line change
@@ -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

+6-19
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,6 @@ if [[ "${runtimes}" != "" ]]; then
9090
INSTALL_DIR="${BUILD_DIR}/install"
9191
mkdir -p ${RUNTIMES_BUILD_DIR}
9292

93-
echo "--- cmake runtimes C++03"
94-
95-
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
96-
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
97-
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
98-
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
99-
-D LIBCXX_CXX_ABI=libcxxabi \
100-
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
101-
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
102-
-D LIBCXX_TEST_PARAMS="std=c++03" \
103-
-D LIBCXXABI_TEST_PARAMS="std=c++03" \
104-
-D LLVM_LIT_ARGS="${lit_args}"
105-
106-
echo "--- ninja runtimes C++03"
107-
108-
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
109-
11093
echo "--- cmake runtimes C++26"
11194

11295
rm -rf "${RUNTIMES_BUILD_DIR}"
@@ -127,7 +110,11 @@ if [[ "${runtimes}" != "" ]]; then
127110

128111
echo "--- cmake runtimes clang modules"
129112

130-
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+
131118
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
132119
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
133120
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
@@ -140,6 +127,6 @@ if [[ "${runtimes}" != "" ]]; then
140127
-D LLVM_LIT_ARGS="${lit_args}"
141128

142129
echo "--- ninja runtimes clang modules"
143-
130+
144131
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
145132
fi

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

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

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

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -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',

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

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

+3-1
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

+3-1
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

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

+10
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();

bolt/include/bolt/Core/Relocation.h

+19-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,16 @@ enum { R_X86_64_converted_reloc_bit = 0x80 };
3535
namespace bolt {
3636

3737
/// Relocation class.
38-
struct Relocation {
38+
class Relocation {
39+
public:
40+
Relocation(uint64_t Offset, MCSymbol *Symbol, uint32_t Type, uint64_t Addend,
41+
uint64_t Value)
42+
: Offset(Offset), Symbol(Symbol), Type(Type), Optional(false),
43+
Addend(Addend), Value(Value) {}
44+
45+
Relocation()
46+
: Offset(0), Symbol(0), Type(0), Optional(0), Addend(0), Value(0) {}
47+
3948
static Triple::ArchType Arch; /// set by BinaryContext ctor.
4049

4150
/// The offset of this relocation in the object it is contained in.
@@ -47,6 +56,11 @@ struct Relocation {
4756
/// Relocation type.
4857
uint32_t Type;
4958

59+
private:
60+
/// Relocations added by optimizations can be optional.
61+
bool Optional = false;
62+
63+
public:
5064
/// The offset from the \p Symbol base used to compute the final
5165
/// value of this relocation.
5266
uint64_t Addend;
@@ -58,6 +72,10 @@ struct Relocation {
5872
/// Return size in bytes of the given relocation \p Type.
5973
static size_t getSizeForType(uint32_t Type);
6074

75+
/// Some relocations added by optimizations are optional, meaning they can be
76+
/// omitted under certain circumstances.
77+
void setOptional() { Optional = true; }
78+
6179
/// Return size of this relocation.
6280
size_t getSize() const { return getSizeForType(Type); }
6381

0 commit comments

Comments
 (0)