Skip to content

Commit f835229

Browse files
committed
Merge remote-tracking branch 'origin/main' into vplan-split-prepareforvectorization
2 parents 16952d7 + c10736a commit f835229

File tree

1,831 files changed

+102570
-47331
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,831 files changed

+102570
-47331
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
/mlir/**/Transforms/SROA.* @moxinilian
130130

131131
# BOLT
132-
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @yota9 @paschalis-mpeis
132+
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @yota9 @paschalis-mpeis @yozhu
133133

134134
# Bazel build system.
135135
/utils/bazel/ @rupprecht @keith @aaronmondal

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ RUN powershell -Command \
9090
RUN git config --system core.longpaths true & \
9191
git config --global core.autocrlf false
9292
93-
ARG RUNNER_VERSION=2.327.0
93+
ARG RUNNER_VERSION=2.327.1
9494
ENV RUNNER_VERSION=$RUNNER_VERSION
9595
9696
RUN powershell -Command \

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

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

9595
FROM ci-container as ci-container-agent
9696

97-
ENV GITHUB_RUNNER_VERSION=2.327.0
97+
ENV GITHUB_RUNNER_VERSION=2.327.1
9898

9999
RUN mkdir actions-runner && \
100100
cd actions-runner && \

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,37 @@ jobs:
2121
- os: ubuntu-24.04
2222
build_type: Debug
2323
ccache-variant: sccache
24-
c_compiler: clang-21
25-
cpp_compiler: clang++-21
24+
c_compiler: clang-20
25+
cpp_compiler: clang++-20
2626
target: x86_64-unknown-linux-llvm
2727
include_scudo: ON
2828
- os: ubuntu-24.04
2929
build_type: Release
3030
ccache-variant: sccache
31-
c_compiler: clang-21
32-
cpp_compiler: clang++-21
31+
c_compiler: clang-20
32+
cpp_compiler: clang++-20
3333
target: x86_64-unknown-linux-llvm
3434
include_scudo: ON
3535
- os: ubuntu-24.04
3636
build_type: MinSizeRel
3737
ccache-variant: sccache
38-
c_compiler: clang-21
39-
cpp_compiler: clang++-21
38+
c_compiler: clang-20
39+
cpp_compiler: clang++-20
4040
target: x86_64-unknown-linux-llvm
4141
include_scudo: ON
4242
# TODO: remove ccache logic when https://github.com/hendrikmuhs/ccache-action/issues/279 is resolved.
4343
- os: ubuntu-24.04-arm
4444
build_type: Debug
4545
ccache-variant: ccache
46-
c_compiler: clang-21
47-
cpp_compiler: clang++-21
46+
c_compiler: clang-20
47+
cpp_compiler: clang++-20
4848
target: aarch64-unknown-linux-llvm
4949
include_scudo: ON
5050
- os: ubuntu-24.04
5151
build_type: Debug
5252
ccache-variant: ccache
53-
c_compiler: clang-21
54-
cpp_compiler: clang++-21
53+
c_compiler: clang-20
54+
cpp_compiler: clang++-20
5555
target: x86_64-unknown-uefi-llvm
5656
include_scudo: OFF
5757
# TODO: add back gcc build when it is fixed
@@ -81,7 +81,7 @@ jobs:
8181
run: |
8282
wget https://apt.llvm.org/llvm.sh
8383
chmod +x llvm.sh
84-
sudo ./llvm.sh 21
84+
sudo ./llvm.sh 20
8585
sudo apt-get update
8686
sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build linux-libc-dev
8787
sudo ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ jobs:
128128
'generic-abi-unstable',
129129
'generic-hardening-mode-debug',
130130
'generic-hardening-mode-extensive',
131+
'generic-hardening-mode-extensive-observe-semantic',
131132
'generic-hardening-mode-fast',
132133
'generic-hardening-mode-fast-with-abi-breaks',
133134
'generic-merged',

.github/workflows/libcxx-build-containers.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ jobs:
3434

3535
- name: Build the Linux builder image
3636
working-directory: libcxx/utils/ci
37-
run: docker compose build actions-builder
37+
run: |
38+
docker compose build builder-base
39+
docker compose build actions-builder
3840
env:
3941
TAG: ${{ github.sha }}
4042

@@ -55,6 +57,7 @@ jobs:
5557
if: github.event_name == 'push'
5658
working-directory: libcxx/utils/ci
5759
run: |
60+
docker compose push builder-base
5861
docker compose push actions-builder
5962
env:
6063
TAG: ${{ github.sha }}

.github/workflows/release-tasks.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,31 @@ jobs:
111111
# Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.
112112
secrets:
113113
RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
114+
115+
uncomment-download-links:
116+
name: Uncomment download links
117+
runs-on: ubuntu-24.04
118+
permissions:
119+
contents: write # For updating the release message.
120+
needs:
121+
- validate-tag
122+
- release-create
123+
- release-binaries
124+
125+
steps:
126+
- name: Install Dependencies
127+
run: |
128+
sudo apt-get update
129+
sudo apt-get install python3-github
130+
131+
- name: Checkout LLVM
132+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
133+
with:
134+
sparse-checkout: llvm/utils/release/github-upload-release.py
135+
sparse-checkout-cone-mode: false
136+
137+
- name: Uncomment Download Links
138+
env:
139+
GITHUB_TOKEN: ${{ github.token }}
140+
run: |
141+
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} uncomment_download_links

bolt/include/bolt/Profile/DataAggregator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ class DataAggregator : public DataReader {
502502
/// entries).
503503
void imputeFallThroughs();
504504

505+
/// Register profiled functions for lite mode.
506+
void registerProfiledFunctions();
507+
505508
/// Debugging dump methods
506509
void dump() const;
507510
void dump(const PerfBranchSample &Sample) const;

bolt/lib/Core/Relocation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,15 +1018,15 @@ void Relocation::print(raw_ostream &OS) const {
10181018
OS << "RType:" << Twine::utohexstr(Type);
10191019
break;
10201020

1021-
case Triple::aarch64:
1021+
case Triple::aarch64: {
10221022
static const char *const AArch64RelocNames[] = {
10231023
#define ELF_RELOC(name, value) #name,
10241024
#include "llvm/BinaryFormat/ELFRelocs/AArch64.def"
10251025
#undef ELF_RELOC
10261026
};
10271027
assert(Type < ArrayRef(AArch64RelocNames).size());
10281028
OS << AArch64RelocNames[Type];
1029-
break;
1029+
} break;
10301030

10311031
case Triple::riscv64:
10321032
// RISC-V relocations are not sequentially numbered so we cannot use an
@@ -1043,15 +1043,15 @@ void Relocation::print(raw_ostream &OS) const {
10431043
}
10441044
break;
10451045

1046-
case Triple::x86_64:
1046+
case Triple::x86_64: {
10471047
static const char *const X86RelocNames[] = {
10481048
#define ELF_RELOC(name, value) #name,
10491049
#include "llvm/BinaryFormat/ELFRelocs/x86_64.def"
10501050
#undef ELF_RELOC
10511051
};
10521052
assert(Type < ArrayRef(X86RelocNames).size());
10531053
OS << X86RelocNames[Type];
1054-
break;
1054+
} break;
10551055
}
10561056
OS << ", 0x" << Twine::utohexstr(Offset);
10571057
if (Symbol) {

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,26 @@ void DataAggregator::imputeFallThroughs() {
581581
outs() << "BOLT-INFO: imputed " << InferredTraces << " traces\n";
582582
}
583583

584+
void DataAggregator::registerProfiledFunctions() {
585+
DenseSet<uint64_t> Addrs;
586+
for (const auto &Trace : llvm::make_first_range(Traces)) {
587+
if (Trace.Branch != Trace::FT_ONLY &&
588+
Trace.Branch != Trace::FT_EXTERNAL_ORIGIN)
589+
Addrs.insert(Trace.Branch);
590+
Addrs.insert(Trace.From);
591+
}
592+
593+
for (const auto [PC, _] : BasicSamples)
594+
Addrs.insert(PC);
595+
596+
for (const PerfMemSample &MemSample : MemSamples)
597+
Addrs.insert(MemSample.PC);
598+
599+
for (const uint64_t Addr : Addrs)
600+
if (BinaryFunction *Func = getBinaryFunctionContainingAddress(Addr))
601+
Func->setHasProfileAvailable();
602+
}
603+
584604
Error DataAggregator::preprocessProfile(BinaryContext &BC) {
585605
this->BC = &BC;
586606

@@ -603,6 +623,7 @@ Error DataAggregator::preprocessProfile(BinaryContext &BC) {
603623
exit(0);
604624
}
605625

626+
registerProfiledFunctions();
606627
return Error::success();
607628
}
608629

@@ -1347,10 +1368,6 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
13471368
}
13481369

13491370
const uint64_t FromOffset = Addr[0]->Offset;
1350-
BinaryFunction *FromFunc = getBinaryFunctionContainingAddress(FromOffset);
1351-
if (FromFunc)
1352-
FromFunc->setHasProfileAvailable();
1353-
13541371
int64_t Count = Counters[0];
13551372
int64_t Mispreds = Counters[1];
13561373

@@ -1361,11 +1378,6 @@ std::error_code DataAggregator::parseAggregatedLBREntry() {
13611378
return std::error_code();
13621379
}
13631380

1364-
const uint64_t ToOffset = Addr[1]->Offset;
1365-
BinaryFunction *ToFunc = getBinaryFunctionContainingAddress(ToOffset);
1366-
if (ToFunc)
1367-
ToFunc->setHasProfileAvailable();
1368-
13691381
/// For fall-through types, adjust locations to match Trace container.
13701382
if (Type == FT || Type == FT_EXTERNAL_ORIGIN || Type == FT_EXTERNAL_RETURN) {
13711383
Addr[2] = Location(Addr[1]->Offset); // Trace To
@@ -1613,9 +1625,6 @@ std::error_code DataAggregator::parseBranchEvents() {
16131625
Traces.reserve(TraceMap.size());
16141626
for (const auto &[Trace, Info] : TraceMap) {
16151627
Traces.emplace_back(Trace, Info);
1616-
for (const uint64_t Addr : {Trace.Branch, Trace.From})
1617-
if (BinaryFunction *BF = getBinaryFunctionContainingAddress(Addr))
1618-
BF->setHasProfileAvailable();
16191628
}
16201629
clear(TraceMap);
16211630

@@ -1676,9 +1685,6 @@ std::error_code DataAggregator::parseBasicEvents() {
16761685
continue;
16771686
++NumTotalSamples;
16781687

1679-
if (BinaryFunction *BF = getBinaryFunctionContainingAddress(Sample->PC))
1680-
BF->setHasProfileAvailable();
1681-
16821688
++BasicSamples[Sample->PC];
16831689
EventNames.insert(Sample->EventName);
16841690
}
@@ -1716,9 +1722,6 @@ std::error_code DataAggregator::parseMemEvents() {
17161722
if (std::error_code EC = Sample.getError())
17171723
return EC;
17181724

1719-
if (BinaryFunction *BF = getBinaryFunctionContainingAddress(Sample->PC))
1720-
BF->setHasProfileAvailable();
1721-
17221725
MemSamples.emplace_back(std::move(Sample.get()));
17231726
}
17241727

0 commit comments

Comments
 (0)