Skip to content

Commit 986922f

Browse files
authored
Merge branch 'main' into feat/55474
2 parents 096ec86 + 697c188 commit 986922f

File tree

1,301 files changed

+80703
-29897
lines changed

Some content is hidden

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

1,301 files changed

+80703
-29897
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,22 @@ jobs:
3636
tag=`date +%s`
3737
container_name="ghcr.io/$GITHUB_REPOSITORY_OWNER/ci-ubuntu-22.04"
3838
echo "container-name=$container_name" >> $GITHUB_OUTPUT
39+
echo "container-name-agent=$container_name-agent" >> $GITHUB_OUTPUT
3940
echo "container-name-tag=$container_name:$tag" >> $GITHUB_OUTPUT
41+
echo "container-name-agent-tag=$container_name-agent:$tag" >> $GITHUB_OUTPUT
4042
echo "container-filename=$(echo $container_name:$tag | sed -e 's/\//-/g' -e 's/:/-/g').tar" >> $GITHUB_OUTPUT
4143
- name: Build container
4244
working-directory: ./.github/workflows/containers/github-action-ci/
4345
run: |
44-
podman build -t ${{ steps.vars.outputs.container-name-tag }} .
46+
podman build --target ci-container -t ${{ steps.vars.outputs.container-name-tag }} .
47+
podman build --target ci-container-agent -t ${{ steps.vars.outputs.container-name-agent-tag }} .
4548
4649
# Save the container so we have it in case the push fails. This also
4750
# allows us to separate the push step into a different job so we can
4851
# maintain minimal permissions while building the container.
4952
- name: Save container image
5053
run: |
51-
podman save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
54+
podman save ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name-agent-tag }} > ${{ steps.vars.outputs.container-filename }}
5255
5356
- name: Upload container image
5457
uses: actions/upload-artifact@v4
@@ -86,3 +89,7 @@ jobs:
8689
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
8790
podman push ${{ needs.build-ci-container.outputs.container-name-tag }}
8891
podman push ${{ needs.build-ci-container.outputs.container-name }}:latest
92+
93+
podman tag ${{ needs.build-ci-container.outpus.container-name-agent-tag }} ${{ needs.build-ci-container.outputs.container-name-agent }}:latest
94+
podman push ${{ needs.build-ci-container.outputs.container-name-agent-tag }}
95+
podman push ${{ needs.build-ci-container.outputs.container-name-agent }}:latest

.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.319.1
111+
ARG RUNNER_VERSION=2.321.0
112112
ENV RUNNER_VERSION=$RUNNER_VERSION
113113
114114
RUN powershell -Command \

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ RUN apt-get update && \
1313
ninja-build \
1414
python3 \
1515
git \
16-
curl
16+
curl \
17+
zlib1g-dev
1718

1819
RUN curl -O -L https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-$LLVM_VERSION.tar.gz && tar -xf llvmorg-$LLVM_VERSION.tar.gz
1920

@@ -38,7 +39,7 @@ RUN cmake -B ./build -G Ninja ./llvm \
3839

3940
RUN ninja -C ./build stage2-clang-bolt stage2-install-distribution && ninja -C ./build install-distribution
4041

41-
FROM base
42+
FROM base as ci-container
4243

4344
COPY --from=stage1-toolchain $LLVM_SYSROOT $LLVM_SYSROOT
4445

@@ -91,4 +92,15 @@ RUN adduser gha sudo
9192
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
9293

9394
USER gha
95+
WORKDIR /home/gha
96+
97+
FROM ci-container as ci-container-agent
98+
99+
ENV GITHUB_RUNNER_VERSION=2.321.0
100+
101+
RUN mkdir actions-runner && \
102+
cd actions-runner && \
103+
curl -O -L https://github.com/actions/runner/releases/download/v$GITHUB_RUNNER_VERSION/actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
104+
tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
105+
rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz
94106

.github/workflows/premerge.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
fetch-depth: 2
3131
- name: Setup ccache
3232
uses: hendrikmuhs/[email protected]
33+
with:
34+
max-size: "2000M"
3335
- name: Build and Test
3436
# Mark the job as a success even if the step fails so that people do
3537
# not get notified while the new premerge pipeline is in an

bolt/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ if (BOLT_ENABLE_RUNTIME)
163163
add_llvm_install_targets(install-bolt_rt
164164
DEPENDS bolt_rt bolt
165165
COMPONENT bolt)
166-
set(LIBBOLT_RT_INSTR "${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins/lib/libbolt_rt_instr.a")
167-
set(LIBBOLT_RT_HUGIFY "${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins/lib/libbolt_rt_hugify.a")
166+
set(LIBBOLT_RT_INSTR "${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins/lib${LLVM_LIBDIR_SUFFIX}/libbolt_rt_instr.a")
167+
set(LIBBOLT_RT_HUGIFY "${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins/lib${LLVM_LIBDIR_SUFFIX}/libbolt_rt_hugify.a")
168168
endif()
169169

170170
find_program(GNU_LD_EXECUTABLE NAMES ${LLVM_DEFAULT_TARGET_TRIPLE}-ld.bfd ld.bfd DOC "GNU ld")

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,12 @@ class BinaryContext {
13631363
if (std::optional<uint32_t> Size = MIB->getSize(Inst))
13641364
return *Size;
13651365

1366+
if (MIB->isPseudo(Inst))
1367+
return 0;
1368+
1369+
if (std::optional<uint32_t> Size = MIB->getInstructionSize(Inst))
1370+
return *Size;
1371+
13661372
if (!Emitter)
13671373
Emitter = this->MCE.get();
13681374
SmallString<256> Code;

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,11 @@ class MCPlusBuilder {
12041204
/// Get instruction size specified via annotation.
12051205
std::optional<uint32_t> getSize(const MCInst &Inst) const;
12061206

1207+
/// Get target-specific instruction size.
1208+
virtual std::optional<uint32_t> getInstructionSize(const MCInst &Inst) const {
1209+
return std::nullopt;
1210+
}
1211+
12071212
/// Set instruction size.
12081213
void setSize(MCInst &Inst, uint32_t Size) const;
12091214

bolt/lib/Passes/Inliner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,13 @@ Inliner::inlineCall(BinaryBasicBlock &CallerBB,
310310
if (MIB.isPseudo(Inst))
311311
continue;
312312

313-
MIB.stripAnnotations(Inst, /*KeepTC=*/BC.isX86());
313+
MIB.stripAnnotations(Inst, /*KeepTC=*/BC.isX86() || BC.isAArch64());
314314

315315
// Fix branch target. Strictly speaking, we don't have to do this as
316316
// targets of direct branches will be fixed later and don't matter
317317
// in the CFG state. However, disassembly may look misleading, and
318318
// hence we do the fixing.
319-
if (MIB.isBranch(Inst)) {
319+
if (MIB.isBranch(Inst) && !MIB.isTailCall(Inst)) {
320320
assert(!MIB.isIndirectBranch(Inst) &&
321321
"unexpected indirect branch in callee");
322322
const BinaryBasicBlock *TargetBB =

0 commit comments

Comments
 (0)