Skip to content

Commit a02263f

Browse files
committed
Revert "Merge branch 'llvm:main' into issue_24841"
This reverts commit 0f7b71f, reversing changes made to 1f9a781.
1 parent 0f7b71f commit a02263f

File tree

2,528 files changed

+38895
-127630
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,528 files changed

+38895
-127630
lines changed

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

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,24 @@ on:
2020
jobs:
2121
build-ci-container:
2222
if: github.repository_owner == 'llvm'
23-
runs-on: ${{ matrix.runs-on }}
24-
strategy:
25-
matrix:
26-
include:
27-
# The arch names should match the names used on dockerhub.
28-
# See https://github.com/docker-library/official-images#architectures-other-than-amd64
29-
- arch: amd64
30-
runs-on: depot-ubuntu-22.04-16
31-
- arch: arm64v8
32-
runs-on: depot-ubuntu-22.04-arm-16
23+
runs-on: depot-ubuntu-22.04-16
24+
outputs:
25+
container-name: ${{ steps.vars.outputs.container-name }}
26+
container-name-agent: ${{ steps.vars.outputs.container-name-agent }}
27+
container-name-tag: ${{ steps.vars.outputs.container-name-tag }}
28+
container-name-agent-tag: ${{ steps.vars.outputs.container-name-agent-tag }}
29+
container-filename: ${{ steps.vars.outputs.container-filename }}
30+
container-agent-filename: ${{ steps.vars.outputs.container-agent-filename }}
3331
steps:
3432
- name: Checkout LLVM
3533
uses: actions/checkout@v4
3634
with:
3735
sparse-checkout: .github/workflows/containers/github-action-ci/
38-
# podman is not installed by default on the ARM64 images.
39-
- name: Install Podman
40-
if: runner.arch == 'ARM64'
41-
run: |
42-
sudo apt-get install podman
4336
- name: Write Variables
4437
id: vars
4538
run: |
46-
tag=$(git rev-parse --short=12 HEAD)
47-
container_name="ghcr.io/$GITHUB_REPOSITORY_OWNER/${{ matrix.arch }}/ci-ubuntu-22.04"
39+
tag=`date +%s`
40+
container_name="ghcr.io/$GITHUB_REPOSITORY_OWNER/ci-ubuntu-22.04"
4841
echo "container-name=$container_name" >> $GITHUB_OUTPUT
4942
echo "container-name-agent=$container_name-agent" >> $GITHUB_OUTPUT
5043
echo "container-name-tag=$container_name:$tag" >> $GITHUB_OUTPUT
@@ -68,7 +61,7 @@ jobs:
6861
- name: Upload container image
6962
uses: actions/upload-artifact@v4
7063
with:
71-
name: container-${{ matrix.arch }}
64+
name: container
7265
path: "*.tar"
7366
retention-days: 14
7467

@@ -91,29 +84,18 @@ jobs:
9184
steps:
9285
- name: Download container
9386
uses: actions/download-artifact@v4
87+
with:
88+
name: container
9489

9590
- name: Push Container
9691
run: |
97-
function push_container {
98-
image_name=$1
99-
latest_name=$(echo $image_name | sed 's/:[a-f0-9]\+$/:latest/g')
100-
podman tag $image_name $latest_name
101-
echo "Pushing $image_name ..."
102-
podman push $image_name
103-
echo "Pushing $latest_name ..."
104-
podman push $latest_name
105-
}
106-
92+
podman load -i ${{ needs.build-ci-container.outputs.container-filename }}
93+
podman tag ${{ needs.build-ci-container.outputs.container-name-tag }} ${{ needs.build-ci-container.outputs.container-name }}:latest
10794
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
108-
for f in $(find . -iname *.tar); do
109-
image_name=$(podman load -q -i $f | sed 's/Loaded image: //g')
110-
push_container $image_name
95+
podman push ${{ needs.build-ci-container.outputs.container-name-tag }}
96+
podman push ${{ needs.build-ci-container.outputs.container-name }}:latest
11197
112-
if echo $image_name | grep '/amd64/'; then
113-
# For amd64, create an alias with the arch component removed.
114-
# This matches the convention used on dockerhub.
115-
default_image_name=$(echo $(dirname $(dirname $image_name))/$(basename $image_name))
116-
podman tag $image_name $default_image_name
117-
push_container $default_image_name
118-
fi
119-
done
98+
podman load -i ${{ needs.build-ci-container.outputs.container-agent-filename }}
99+
podman tag ${{ needs.build-ci-container.outputs.container-name-agent-tag }} ${{ needs.build-ci-container.outputs.container-name-agent }}:latest
100+
podman push ${{ needs.build-ci-container.outputs.container-name-agent-tag }}
101+
podman push ${{ needs.build-ci-container.outputs.container-name-agent }}:latest

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
build_type: [Debug, Release, MinSizeRel]
1918
include:
2019
- os: ubuntu-24.04
2120
ccache-variant: sccache
@@ -69,7 +68,7 @@ jobs:
6968
cmake -B ${{ steps.strings.outputs.build-output-dir }}
7069
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
7170
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
72-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
71+
-DCMAKE_BUILD_TYPE=MinSizeRel
7372
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
7473
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
7574
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
1717
fail-fast: false
1818
matrix:
19-
build_type: [Debug, Release, MinSizeRel]
2019
include:
2120
# TODO: add linux gcc when it is fixed
2221
- os: ubuntu-24.04
@@ -96,7 +95,7 @@ jobs:
9695
cmake -B ${{ steps.strings.outputs.build-output-dir }}
9796
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }}
9897
-DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }}
99-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
98+
-DCMAKE_BUILD_TYPE=MinSizeRel
10099
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
101100
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
102101
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW

.github/workflows/premerge.yaml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,20 @@ permissions:
55

66
on:
77
pull_request:
8-
types:
9-
- opened
10-
- synchronize
11-
- reopened
12-
# When a PR is closed, we still start this workflow, but then skip
13-
# all the jobs, which makes it effectively a no-op. The reason to
14-
# do this is that it allows us to take advantage of concurrency groups
15-
# to cancel in progress CI jobs whenever the PR is closed.
16-
- closed
178
paths:
189
- .github/workflows/premerge.yaml
1910
push:
2011
branches:
2112
- 'main'
2213
- 'release/**'
2314

24-
concurrency:
25-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
26-
cancel-in-progress: true
27-
2815
jobs:
2916
premerge-checks-linux:
30-
if: >-
31-
github.repository_owner == 'llvm' &&
32-
(github.event_name != 'pull_request' || github.event.action != 'closed')
17+
if: github.repository_owner == 'llvm'
3318
runs-on: llvm-premerge-linux-runners
19+
concurrency:
20+
group: ${{ github.workflow }}-linux-${{ github.event.pull_request.number || github.sha }}
21+
cancel-in-progress: true
3422
steps:
3523
- name: Checkout LLVM
3624
uses: actions/checkout@v4
@@ -85,10 +73,11 @@ jobs:
8573
./.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"
8674
8775
premerge-checks-windows:
88-
if: >-
89-
github.repository_owner == 'llvm' &&
90-
(github.event_name != 'pull_request' || github.event.action != 'closed')
76+
if: github.repository_owner == 'llvm'
9177
runs-on: llvm-premerge-windows-runners
78+
concurrency:
79+
group: ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
80+
cancel-in-progress: true
9281
defaults:
9382
run:
9483
shell: bash
@@ -146,11 +135,13 @@ jobs:
146135
147136
permerge-check-macos:
148137
runs-on: macos-14
138+
concurrency:
139+
group: ${{ github.workflow }}-macos-${{ github.event.pull_request.number || github.sha }}
140+
cancel-in-progress: true
149141
if: >-
150142
github.repository_owner == 'llvm' &&
151143
(startswith(github.ref_name, 'release/') ||
152-
startswith(github.base_ref, 'release/')) &&
153-
(github.event_name != 'pull_request' || github.event.action != 'closed')
144+
startswith(github.base_ref, 'release/'))
154145
steps:
155146
- name: Checkout LLVM
156147
uses: actions/checkout@v4

.github/workflows/release-binaries.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
target-cmake-flags: ${{ steps.vars.outputs.target-cmake-flags }}
5959
ccache: ${{ steps.vars.outputs.ccache }}
6060
build-flang: ${{ steps.vars.outputs.build-flang }}
61+
enable-pgo: ${{ steps.vars.outputs.enable-pgo }}
6162
release-binary-basename: ${{ steps.vars.outputs.release-binary-basename }}
6263
release-binary-filename: ${{ steps.vars.outputs.release-binary-filename }}
6364
build-runs-on: ${{ steps.vars.outputs.build-runs-on }}
@@ -129,6 +130,9 @@ jobs:
129130
echo ccache=sccache >> $GITHUB_OUTPUT
130131
fi
131132
133+
# Detect necessary CMake flags
134+
echo "enable-pgo=false" >> $GITHUB_OUTPUT
135+
target_cmake_flags="-DLLVM_RELEASE_ENABLE_PGO=OFF"
132136
# The macOS builds try to cross compile some libraries so we need to
133137
# add extra CMake args to disable them.
134138
# See https://github.com/llvm/llvm-project/issues/99767
@@ -234,14 +238,13 @@ jobs:
234238
${{ needs.prepare.outputs.target-cmake-flags }} \
235239
-C clang/cmake/caches/Release.cmake \
236240
-DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
237-
-DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
241+
-DBOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
238242
239243
- name: Build
240244
shell: bash
241245
run: |
242246
ninja -v -C ${{ steps.setup-stage.outputs.build-prefix }}/build stage2-package
243-
release_dir=`find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname 'stage2-bins'`
244-
mv $release_dir/${{ needs.prepare.outputs.release-binary-filename }} .
247+
mv ${{ steps.setup-stage.outputs.build-prefix }}/build/tools/clang/stage2-bins/${{ needs.prepare.outputs.release-binary-filename }} .
245248
246249
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
247250
with:
@@ -256,7 +259,7 @@ jobs:
256259
shell: bash
257260
run: |
258261
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname ${{ needs.prepare.outputs.release-binary-filename }} -delete
259-
find ${{ steps.setup-stage.outputs.build-prefix }}/build -iname _CPack_Packages -prune -exec rm -r {} +
262+
rm -Rf ${{ steps.setup-stage.outputs.build-prefix }}/build/tools/clang/stage2-bins/_CPack_Packages
260263
261264
- name: Save Stage
262265
uses: ./workflows-main/.github/workflows/release-binaries-save-stage

.github/workflows/release-tasks.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,20 @@ jobs:
8989
needs:
9090
- validate-tag
9191
- release-create
92-
uses: ./.github/workflows/release-binaries-all.yml
92+
strategy:
93+
fail-fast: false
94+
matrix:
95+
runs-on:
96+
- ubuntu-22.04
97+
- windows-2022
98+
- macos-13
99+
- macos-14
100+
101+
uses: ./.github/workflows/release-binaries.yml
93102
with:
94103
release-version: ${{ needs.validate-tag.outputs.release-version }}
95104
upload: true
105+
runs-on: ${{ matrix.runs-on }}
96106
# Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.
97107
secrets:
98108
RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,17 +1435,6 @@ class BinaryContext {
14351435
bool PrintRelocations = false,
14361436
StringRef Endl = "\n") const;
14371437

1438-
/// Print data when embedded in the instruction stream keeping the format
1439-
/// similar to printInstruction().
1440-
void printData(raw_ostream &OS, ArrayRef<uint8_t> Data,
1441-
uint64_t Offset) const;
1442-
1443-
/// Extract data from the binary corresponding to [Address, Address + Size)
1444-
/// range. Return an empty ArrayRef if the address range does not belong to
1445-
/// any section in the binary, crosses a section boundary, or falls into a
1446-
/// virtual section.
1447-
ArrayRef<uint8_t> extractData(uint64_t Address, uint64_t Size) const;
1448-
14491438
/// Print a range of instructions.
14501439
template <typename Itr>
14511440
uint64_t

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,11 +2060,6 @@ class BinaryFunction {
20602060
return Islands ? Islands->getAlignment() : 1;
20612061
}
20622062

2063-
/// If there is a constant island in the range [StartOffset, EndOffset),
2064-
/// return its address.
2065-
std::optional<uint64_t> getIslandInRange(uint64_t StartOffset,
2066-
uint64_t EndOffset) const;
2067-
20682063
uint64_t
20692064
estimateConstantIslandSize(const BinaryFunction *OnBehalfOf = nullptr) const {
20702065
if (!Islands)

bolt/lib/Core/BinaryContext.cpp

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,11 +1759,7 @@ void BinaryContext::preprocessDebugInfo() {
17591759
dwarf::toString(CU->getUnitDIE().find(dwarf::DW_AT_name), nullptr);
17601760
if (std::optional<uint64_t> DWOID = CU->getDWOId()) {
17611761
auto Iter = DWOCUs.find(*DWOID);
1762-
if (Iter == DWOCUs.end()) {
1763-
this->errs() << "BOLT-ERROR: DWO CU was not found for " << Name
1764-
<< '\n';
1765-
exit(1);
1766-
}
1762+
assert(Iter != DWOCUs.end() && "DWO CU was not found.");
17671763
Name = dwarf::toString(
17681764
Iter->second->getUnitDIE().find(dwarf::DW_AT_name), nullptr);
17691765
}
@@ -1946,43 +1942,6 @@ static void printDebugInfo(raw_ostream &OS, const MCInst &Instruction,
19461942
OS << " discriminator:" << Row.Discriminator;
19471943
}
19481944

1949-
ArrayRef<uint8_t> BinaryContext::extractData(uint64_t Address,
1950-
uint64_t Size) const {
1951-
ArrayRef<uint8_t> Res;
1952-
1953-
const ErrorOr<const BinarySection &> Section = getSectionForAddress(Address);
1954-
if (!Section || Section->isVirtual())
1955-
return Res;
1956-
1957-
if (!Section->containsRange(Address, Size))
1958-
return Res;
1959-
1960-
auto *Bytes =
1961-
reinterpret_cast<const uint8_t *>(Section->getContents().data());
1962-
return ArrayRef<uint8_t>(Bytes + Address - Section->getAddress(), Size);
1963-
}
1964-
1965-
void BinaryContext::printData(raw_ostream &OS, ArrayRef<uint8_t> Data,
1966-
uint64_t Offset) const {
1967-
DataExtractor DE(Data, AsmInfo->isLittleEndian(),
1968-
AsmInfo->getCodePointerSize());
1969-
uint64_t DataOffset = 0;
1970-
while (DataOffset + 4 <= Data.size()) {
1971-
OS << format(" %08" PRIx64 ": \t.word\t0x", Offset + DataOffset);
1972-
const auto Word = DE.getUnsigned(&DataOffset, 4);
1973-
OS << Twine::utohexstr(Word) << '\n';
1974-
}
1975-
if (DataOffset + 2 <= Data.size()) {
1976-
OS << format(" %08" PRIx64 ": \t.short\t0x", Offset + DataOffset);
1977-
const auto Short = DE.getUnsigned(&DataOffset, 2);
1978-
OS << Twine::utohexstr(Short) << '\n';
1979-
}
1980-
if (DataOffset + 1 == Data.size()) {
1981-
OS << format(" %08" PRIx64 ": \t.byte\t0x%x\n", Offset + DataOffset,
1982-
Data[DataOffset]);
1983-
}
1984-
}
1985-
19861945
void BinaryContext::printInstruction(raw_ostream &OS, const MCInst &Instruction,
19871946
uint64_t Offset,
19881947
const BinaryFunction *Function,

0 commit comments

Comments
 (0)