Skip to content

Commit 4f96cf9

Browse files
committed
Rebase
Created using spr 1.3.5
2 parents 25767fc + f1d5e70 commit 4f96cf9

File tree

2,266 files changed

+110766
-63252
lines changed

Some content is hidden

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

2,266 files changed

+110766
-63252
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ if [[ "${windows_projects}" != "" ]]; then
128128
limit: 2
129129
timeout_in_minutes: 150
130130
env:
131-
CC: 'cl'
132-
CXX: 'cl'
133-
LD: 'link'
131+
MAX_PARALLEL_COMPILE_JOBS: '16'
132+
MAX_PARALLEL_LINK_JOBS: '4'
134133
commands:
135134
- 'C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64'
136135
- 'bash .ci/monolithic-windows.sh "$(echo ${windows_projects} | tr ' ' ';')" "$(echo ${windows_check_targets})"'

.ci/monolithic-windows.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ echo "--- cmake"
5050
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
5151
pip install -q -r "${MONOREPO_ROOT}"/.ci/requirements.txt
5252

53+
export CC=cl
54+
export CXX=cl
55+
export LD=link
56+
5357
# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
5458
# on fixing a build reliability issue on the build server, please
5559
# see https://github.com/llvm/llvm-project/pull/82393 and
@@ -72,8 +76,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
7276
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
7377
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
7478
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
75-
-D LLVM_PARALLEL_COMPILE_JOBS=16 \
76-
-D LLVM_PARALLEL_LINK_JOBS=4
79+
-D LLVM_PARALLEL_COMPILE_JOBS=${MAX_PARALLEL_COMPILE_JOBS} \
80+
-D LLVM_PARALLEL_LINK_JOBS=${MAX_PARALLEL_LINK_JOBS}
7781

7882
echo "--- ninja"
7983
# Targets are not escaped as they are passed as separate arguments.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ RUN choco install -y handle
108108
109109
RUN pip3 install pywin32 buildbot-worker==2.8.4
110110
111-
ARG RUNNER_VERSION=2.321.0
111+
ARG RUNNER_VERSION=2.322.0
112112
ENV RUNNER_VERSION=$RUNNER_VERSION
113113
114114
RUN powershell -Command \

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ WORKDIR /home/gha
9696

9797
FROM ci-container as ci-container-agent
9898

99-
ENV GITHUB_RUNNER_VERSION=2.321.0
99+
ENV GITHUB_RUNNER_VERSION=2.322.0
100100

101101
RUN mkdir actions-runner && \
102102
cd actions-runner && \

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,19 @@ on:
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-24.04
14+
runs-on: ${{ matrix.os }}
1515
strategy:
1616
fail-fast: false
1717
matrix:
1818
include:
19-
- c_compiler: clang
19+
- os: ubuntu-24.04
20+
ccache-variant: sccache
21+
c_compiler: clang
22+
cpp_compiler: clang++
23+
# TODO: remove ccache logic when https://github.com/hendrikmuhs/ccache-action/issues/279 is resolved.
24+
- os: ubuntu-24.04-arm
25+
ccache-variant: ccache
26+
c_compiler: clang
2027
cpp_compiler: clang++
2128
# TODO: add back gcc build when it is fixed
2229
# - c_compiler: gcc
@@ -35,7 +42,7 @@ jobs:
3542
with:
3643
max-size: 1G
3744
key: libc_fullbuild_${{ matrix.c_compiler }}
38-
variant: sccache
45+
variant: ${{ matrix.ccache-variant }}
3946

4047
# Notice:
4148
# - MPFR is required by some of the mathlib tests.
@@ -62,8 +69,8 @@ jobs:
6269
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
6370
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
6471
-DCMAKE_BUILD_TYPE=MinSizeRel
65-
-DCMAKE_C_COMPILER_LAUNCHER=sccache
66-
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
72+
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
73+
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
6774
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}
6875
-DLLVM_ENABLE_RUNTIMES="libc;compiler-rt"
6976
-DLLVM_LIBC_FULL_BUILD=ON

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,28 @@ jobs:
1919
include:
2020
# TODO: add linux gcc when it is fixed
2121
- os: ubuntu-24.04
22+
ccache-variant: sccache
23+
compiler:
24+
c_compiler: clang
25+
cpp_compiler: clang++
26+
# TODO: remove ccache logic when https://github.com/hendrikmuhs/ccache-action/issues/279 is resolved.
27+
- os: ubuntu-24.04-arm
28+
ccache-variant: ccache
2229
compiler:
2330
c_compiler: clang
2431
cpp_compiler: clang++
2532
- os: windows-2022
33+
ccache-variant: sccache
34+
compiler:
35+
c_compiler: clang-cl
36+
cpp_compiler: clang-cl
37+
- os: windows-2025
38+
ccache-variant: sccache
2639
compiler:
2740
c_compiler: clang-cl
2841
cpp_compiler: clang-cl
2942
- os: macos-14
43+
ccache-variant: sccache
3044
compiler:
3145
c_compiler: clang
3246
cpp_compiler: clang++
@@ -46,7 +60,7 @@ jobs:
4660
with:
4761
max-size: 1G
4862
key: libc_overlay_build_${{ matrix.os }}_${{ matrix.compiler.c_compiler }}
49-
variant: sccache
63+
variant: ${{ matrix.ccache-variant }}
5064

5165
# MPFR is required by some of the mathlib tests.
5266
- name: Prepare dependencies (Ubuntu)
@@ -82,8 +96,8 @@ jobs:
8296
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }}
8397
-DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }}
8498
-DCMAKE_BUILD_TYPE=MinSizeRel
85-
-DCMAKE_C_COMPILER_LAUNCHER=sccache
86-
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
99+
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
100+
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
87101
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW
88102
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
89103
-DLLVM_ENABLE_RUNTIMES=libc

.github/workflows/premerge.yaml

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
if: github.repository_owner == 'llvm'
1717
runs-on: llvm-premerge-linux-runners
1818
concurrency:
19-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
19+
group: ${{ github.workflow }}-linux-${{ github.event.pull_request.number || github.sha }}
2020
cancel-in-progress: true
2121
steps:
2222
- name: Checkout LLVM
@@ -70,3 +70,65 @@ jobs:
7070
export CXX=/opt/llvm/bin/clang++
7171
7272
./.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"
73+
74+
premerge-checks-windows:
75+
if: github.repository_owner == 'llvm'
76+
runs-on: llvm-premerge-windows-runners
77+
concurrency:
78+
group: ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
79+
cancel-in-progress: true
80+
defaults:
81+
run:
82+
shell: bash
83+
steps:
84+
- name: Checkout LLVM
85+
uses: actions/checkout@v4
86+
with:
87+
fetch-depth: 2
88+
- name: Setup ccache
89+
uses: hendrikmuhs/[email protected]
90+
with:
91+
variant: "sccache"
92+
max-size: "2000M"
93+
- name: Compute Projects
94+
id: vars
95+
run: |
96+
modified_files=$(git diff --name-only HEAD~1...HEAD)
97+
modified_dirs=$(echo "$modified_files" | cut -d'/' -f1 | sort | uniq)
98+
99+
echo $modified_files
100+
echo $modified_dirs
101+
102+
. ./.ci/compute-projects.sh
103+
104+
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
105+
modified_projects="$(keep-modified-projects ${all_projects})"
106+
107+
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
108+
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq | tr -d '\r' | tr '\n' ' ')
109+
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq | tr -d '\r' | tr '\n' ';')
110+
111+
if [[ "${windows_projects}" == "" ]]; then
112+
echo "No projects to build"
113+
fi
114+
115+
echo "Building projects: ${windows_projects}"
116+
echo "Running project checks targets: ${windows_check_targets}"
117+
118+
echo "windows-projects=${windows_projects}" >> $GITHUB_OUTPUT
119+
echo "windows-check-targets=${windows_check_targets}" >> $GITHUB_OUTPUT
120+
- name: Build and Test
121+
# Mark the job as a success even if the step fails so that people do
122+
# not get notified while the new premerge pipeline is in an
123+
# experimental state.
124+
# TODO(boomanaiden154): Remove this once the pipeline is stable and we
125+
# are ready for people to start recieving notifications.
126+
continue-on-error: true
127+
if: ${{ steps.vars.outputs.windows-projects != '' }}
128+
shell: cmd
129+
run: |
130+
set MAX_PARALLEL_COMPILE_JOBS=64
131+
set MAX_PARALLEL_LINK_JOBS=64
132+
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
133+
bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
134+

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ jobs:
8383
matrix:
8484
runs-on:
8585
- ubuntu-22.04
86+
- ubuntu-22.04-arm
8687
- macos-13
8788
- macos-14
8889

.github/workflows/release-binaries.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
type: choice
1919
options:
2020
- ubuntu-22.04
21+
- ubuntu-22.04-arm
2122
- macos-13
2223
- macos-14
2324

@@ -49,12 +50,13 @@ jobs:
4950
prepare:
5051
name: Prepare to build binaries
5152
runs-on: ${{ inputs.runs-on }}
52-
if: github.repository == 'llvm/llvm-project'
53+
if: github.repository_owner == 'llvm'
5354
outputs:
5455
release-version: ${{ steps.vars.outputs.release-version }}
5556
ref: ${{ steps.vars.outputs.ref }}
5657
upload: ${{ steps.vars.outputs.upload }}
5758
target-cmake-flags: ${{ steps.vars.outputs.target-cmake-flags }}
59+
ccache: ${{ steps.vars.outputs.ccache }}
5860
build-flang: ${{ steps.vars.outputs.build-flang }}
5961
enable-pgo: ${{ steps.vars.outputs.enable-pgo }}
6062
release-binary-basename: ${{ steps.vars.outputs.release-binary-basename }}
@@ -119,8 +121,16 @@ jobs:
119121
echo "release-binary-basename=$release_binary_basename" >> $GITHUB_OUTPUT
120122
echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT
121123
122-
# Detect necessary CMake flags
123124
target="$RUNNER_OS-$RUNNER_ARCH"
125+
# The hendrikmuhs/ccache-action action does not support installing sccache
126+
# on arm64 Linux.
127+
if [ "$target" = "Linux-ARM64" ]; then
128+
echo ccache=ccache >> $GITHUB_OUTPUT
129+
else
130+
echo ccache=sccache >> $GITHUB_OUTPUT
131+
fi
132+
133+
# Detect necessary CMake flags
124134
echo "enable-pgo=false" >> $GITHUB_OUTPUT
125135
target_cmake_flags="-DLLVM_RELEASE_ENABLE_PGO=OFF"
126136
# The macOS builds try to cross compile some libraries so we need to
@@ -146,7 +156,7 @@ jobs:
146156
echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
147157
echo "build-flang=$build_flang" >> $GITHUB_OUTPUT
148158
case "${{ inputs.runs-on }}" in
149-
ubuntu-22.04)
159+
ubuntu-22.04*)
150160
build_runs_on="depot-${{ inputs.runs-on }}-16"
151161
test_runs_on=$build_runs_on
152162
;;
@@ -177,7 +187,7 @@ jobs:
177187
build-release-package:
178188
name: "Build Release Package"
179189
needs: prepare
180-
if: github.repository == 'llvm/llvm-project'
190+
if: github.repository_owner == 'llvm'
181191
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
182192
steps:
183193

@@ -221,12 +231,14 @@ jobs:
221231
with:
222232
# Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
223233
max-size: 2G
224-
key: sccache-${{ runner.os }}-${{ runner.arch }}-release
225-
variant: sccache
234+
key: ${{ needs.prepare.outputs.ccache }}-${{ runner.os }}-${{ runner.arch }}-release
235+
variant: ${{ needs.prepare.outputs.ccache }}
226236

227237
- name: Configure
228238
id: build
229239
shell: bash
240+
env:
241+
CCACHE_BIN: ${{ needs.prepare.outputs.ccache }}
230242
run: |
231243
# There were some issues on the ARM64 MacOS runners with trying to build x86 object,
232244
# so we need to set some extra cmake flags to disable this.
@@ -235,8 +247,8 @@ jobs:
235247
-C clang/cmake/caches/Release.cmake \
236248
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
237249
-DBOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}" \
238-
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
239-
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
250+
-DCMAKE_C_COMPILER_LAUNCHER=$CCACHE_BIN \
251+
-DCMAKE_CXX_COMPILER_LAUNCHER=$CCACHE_BIN
240252
- name: Build
241253
shell: bash
242254
run: |
@@ -327,7 +339,7 @@ jobs:
327339
- prepare
328340
- build-release-package
329341
if: >-
330-
github.repository == 'llvm/llvm-project'
342+
github.repository_owner == 'llvm'
331343
runs-on: ${{ needs.prepare.outputs.test-runs-on }}
332344
steps:
333345
- name: Checkout Actions

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,11 +1426,12 @@ class MCPlusBuilder {
14261426
}
14271427

14281428
/// Creates an indirect call to the function within the \p DirectCall PLT
1429-
/// stub. The function's memory location is pointed by the \p TargetLocation
1429+
/// stub. The function's address location is pointed by the \p TargetLocation
14301430
/// symbol.
1431+
/// Move instruction annotations from \p DirectCall to the indirect call.
14311432
virtual InstructionListType
1432-
createIndirectPltCall(const MCInst &DirectCall,
1433-
const MCSymbol *TargetLocation, MCContext *Ctx) {
1433+
createIndirectPLTCall(MCInst &&DirectCall, const MCSymbol *TargetLocation,
1434+
MCContext *Ctx) {
14341435
llvm_unreachable("not implemented");
14351436
return {};
14361437
}

0 commit comments

Comments
 (0)