Skip to content

Commit 9d22f7f

Browse files
authored
Merge branch 'main' into aarch64-reg-aliases
2 parents 448a86d + 4881512 commit 9d22f7f

File tree

2,520 files changed

+65549
-45114
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,520 files changed

+65549
-45114
lines changed

.ci/monolithic-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ start-group "ninja"
5555
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
5656
cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
5757

58-
if [[ "${runtime_targets}" != "" ]]; then
58+
if [[ "${runtimes_targets}" != "" ]]; then
5959
start-group "ninja runtimes"
6060

6161
ninja -C "${BUILD_DIR}" -k 0 ${runtimes_targets} |& tee ninja_runtimes.log

.github/CODEOWNERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@
6060
/mlir/lib/Conversion/*ToROCDL @krzysz00 @kuhar
6161
/mlir/include/mlir/Dialect/LLVMIR/ROCDL* @krzysz00 @kuhar
6262

63+
# XeGPU and XeVM dialects in MLIR.
64+
/mlir/include/mlir/Dialect/XeGPU @charithaintc @Jianhui-Li
65+
/mlir/lib/Dialect/XeGPU @charithaintc @Jianhui-Li
66+
/mlir/lib/Conversion/*XeGPU* @charithaintc @Jianhui-Li
67+
/mlir/include/mlir/Dialect/XeGPU/Transforms @charithaintc @Jianhui-Li
68+
/mlir/lib/Dialect/XeGPU/Transforms @charithaintc @Jianhui-Li
69+
/mlir/include/mlir/Dialect/LLVMIR/XeVM* @silee2
70+
/mlir/lib/Dialect/LLVMIR/IR/XeVM @silee2
71+
/mlir/lib/Conversion/*XeVM* @silee2
72+
6373
# Bufferization Dialect in MLIR.
6474
/mlir/include/mlir/Dialect/Bufferization @matthias-springer
6575
/mlir/lib/Dialect/Bufferization @matthias-springer

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ concurrency:
3636
jobs:
3737
stage1:
3838
if: github.repository_owner == 'llvm'
39-
runs-on: llvm-premerge-libcxx-next-runners
39+
runs-on: llvm-premerge-libcxx-runners
4040
continue-on-error: false
4141
strategy:
4242
fail-fast: false
@@ -73,7 +73,7 @@ jobs:
7373
**/crash_diagnostics/*
7474
stage2:
7575
if: github.repository_owner == 'llvm'
76-
runs-on: llvm-premerge-libcxx-next-runners
76+
runs-on: llvm-premerge-libcxx-runners
7777
needs: [ stage1 ]
7878
continue-on-error: false
7979
strategy:
@@ -148,19 +148,19 @@ jobs:
148148
'generic-static',
149149
'bootstrapping-build'
150150
]
151-
machine: [ 'llvm-premerge-libcxx-next-runners' ]
151+
machine: [ 'llvm-premerge-libcxx-runners' ]
152152
include:
153153
- config: 'generic-cxx26'
154-
machine: llvm-premerge-libcxx-next-runners
154+
machine: llvm-premerge-libcxx-runners
155155
- config: 'generic-asan'
156-
machine: llvm-premerge-libcxx-next-runners
156+
machine: llvm-premerge-libcxx-runners
157157
- config: 'generic-tsan'
158-
machine: llvm-premerge-libcxx-next-runners
158+
machine: llvm-premerge-libcxx-runners
159159
- config: 'generic-ubsan'
160-
machine: llvm-premerge-libcxx-next-runners
160+
machine: llvm-premerge-libcxx-runners
161161
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
162162
- config: 'generic-msan'
163-
machine: llvm-premerge-libcxx-next-runners
163+
machine: llvm-premerge-libcxx-runners
164164
runs-on: ${{ matrix.machine }}
165165
steps:
166166
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

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

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ on:
1515
branches:
1616
- main
1717
paths:
18-
- 'libcxx/utils/ci/**'
18+
- 'libcxx/utils/ci/docker/**'
1919
- '.github/workflows/libcxx-build-containers.yml'
2020
pull_request:
2121
paths:
22-
- 'libcxx/utils/ci/**'
22+
- 'libcxx/utils/ci/docker/**'
2323
- '.github/workflows/libcxx-build-containers.yml'
2424

2525
jobs:
@@ -40,17 +40,18 @@ jobs:
4040
echo '{ "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json
4141
sudo systemctl restart docker
4242
43-
- name: Build the Linux builder image
44-
working-directory: libcxx/utils/ci
45-
run: |
46-
docker compose build builder-base
47-
docker compose build actions-builder
43+
- name: Build the base image
44+
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder-base
45+
env:
46+
TAG: ${{ github.sha }}
47+
48+
- name: Build the Linux Github Actions image
49+
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder
4850
env:
4951
TAG: ${{ github.sha }}
5052

5153
- name: Build the Android builder image
52-
working-directory: libcxx/utils/ci
53-
run: docker compose build android-buildkite-builder
54+
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-android-builder
5455
env:
5556
TAG: ${{ github.sha }}
5657

@@ -61,19 +62,21 @@ jobs:
6162
username: ${{ github.actor }}
6263
password: ${{ secrets.GITHUB_TOKEN }}
6364

64-
- name: Push the Linux builder image
65+
- name: Push the images
6566
if: github.event_name == 'push'
66-
working-directory: libcxx/utils/ci
67-
run: |
68-
docker compose push builder-base
69-
docker compose push actions-builder
70-
env:
71-
TAG: ${{ github.sha }}
67+
run: docker compose push libcxx-linux-builder-base libcxx-linux-builder libcxx-android-builder
7268

73-
- name: Push the Android builder image
74-
if: github.event_name == 'push'
75-
working-directory: libcxx/utils/ci
69+
# We create tarballs with the images and upload them as artifacts, since that's useful for testing
70+
# the images when making changes.
71+
- name: Create image tarballs
7672
run: |
77-
docker compose push android-buildkite-builder
78-
env:
79-
TAG: ${{ github.sha }}
73+
docker image save ghcr.io/llvm/libcxx-linux-builder-base:${{ github.sha }} | gzip > libcxx-linux-builder-base.tar.gz
74+
docker image save ghcr.io/llvm/libcxx-linux-builder:${{ github.sha }} | gzip > libcxx-linux-builder.tar.gz
75+
docker image save ghcr.io/llvm/libcxx-android-builder:${{ github.sha }} | gzip > libcxx-android-builder.tar.gz
76+
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
77+
with:
78+
name: libcxx-docker-images
79+
path: |
80+
libcxx-linux-builder-base.tar.gz
81+
libcxx-linux-builder.tar.gz
82+
libcxx-android-builder.tar.gz

bolt/include/bolt/Rewrite/RewriteInstance.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ class RewriteInstance {
139139
void handleRelocation(const object::SectionRef &RelocatedSection,
140140
const RelocationRef &Rel);
141141

142+
/// Collect functions that are specified to be bumped.
143+
void selectFunctionsToPrint();
144+
142145
/// Mark functions that are not meant for processing as ignored.
143146
void selectFunctionsToProcess();
144147

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ extern cl::OptionCategory BoltOptCategory;
6161

6262
extern cl::opt<bool> EnableBAT;
6363
extern cl::opt<bool> Instrument;
64+
extern cl::list<std::string> PrintOnly;
65+
extern cl::opt<std::string> PrintOnlyFile;
6466
extern cl::opt<bool> StrictMode;
6567
extern cl::opt<bool> UpdateDebugSections;
6668
extern cl::opt<unsigned> Verbosity;
@@ -133,14 +135,6 @@ PrintDynoStatsOnly("print-dyno-stats-only",
133135
cl::Hidden,
134136
cl::cat(BoltCategory));
135137

136-
static cl::list<std::string>
137-
PrintOnly("print-only",
138-
cl::CommaSeparated,
139-
cl::desc("list of functions to print"),
140-
cl::value_desc("func1,func2,func3,..."),
141-
cl::Hidden,
142-
cl::cat(BoltCategory));
143-
144138
cl::opt<bool>
145139
TimeBuild("time-build",
146140
cl::desc("print time spent constructing binary functions"),

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ extern cl::opt<bool> Hugify;
8282
extern cl::opt<bool> Instrument;
8383
extern cl::opt<bool> KeepNops;
8484
extern cl::opt<bool> Lite;
85+
extern cl::list<std::string> PrintOnly;
86+
extern cl::opt<std::string> PrintOnlyFile;
8587
extern cl::list<std::string> ReorderData;
8688
extern cl::opt<bolt::ReorderFunctions::ReorderType> ReorderFunctions;
8789
extern cl::opt<bool> TerminalHLT;
@@ -730,6 +732,8 @@ Error RewriteInstance::run() {
730732
<< "\n";
731733
BC->outs() << "BOLT-INFO: BOLT version: " << BoltRevision << "\n";
732734

735+
selectFunctionsToPrint();
736+
733737
if (Error E = discoverStorage())
734738
return E;
735739
if (Error E = readSpecialSections())
@@ -3100,17 +3104,22 @@ static BinaryFunction *getInitFunctionIfStaticBinary(BinaryContext &BC) {
31003104
return BC.getBinaryFunctionAtAddress(BD->getAddress());
31013105
}
31023106

3107+
static void populateFunctionNames(cl::opt<std::string> &FunctionNamesFile,
3108+
cl::list<std::string> &FunctionNames) {
3109+
if (FunctionNamesFile.empty())
3110+
return;
3111+
std::ifstream FuncsFile(FunctionNamesFile, std::ios::in);
3112+
std::string FuncName;
3113+
while (std::getline(FuncsFile, FuncName))
3114+
FunctionNames.push_back(FuncName);
3115+
}
3116+
3117+
void RewriteInstance::selectFunctionsToPrint() {
3118+
populateFunctionNames(opts::PrintOnlyFile, opts::PrintOnly);
3119+
}
3120+
31033121
void RewriteInstance::selectFunctionsToProcess() {
31043122
// Extend the list of functions to process or skip from a file.
3105-
auto populateFunctionNames = [](cl::opt<std::string> &FunctionNamesFile,
3106-
cl::list<std::string> &FunctionNames) {
3107-
if (FunctionNamesFile.empty())
3108-
return;
3109-
std::ifstream FuncsFile(FunctionNamesFile, std::ios::in);
3110-
std::string FuncName;
3111-
while (std::getline(FuncsFile, FuncName))
3112-
FunctionNames.push_back(FuncName);
3113-
};
31143123
populateFunctionNames(opts::FunctionNamesFile, opts::ForceFunctionNames);
31153124
populateFunctionNames(opts::SkipFunctionNamesFile, opts::SkipFunctionNames);
31163125
populateFunctionNames(opts::FunctionNamesFileNR, opts::ForceFunctionNamesNR);

bolt/lib/Utils/CommandLineOpts.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@ cl::opt<bool> PrintCacheMetrics(
245245
cl::desc("calculate and print various metrics for instruction cache"),
246246
cl::cat(BoltOptCategory));
247247

248+
cl::list<std::string> PrintOnly("print-only", cl::CommaSeparated,
249+
cl::desc("list of functions to print"),
250+
cl::value_desc("func1,func2,func3,..."),
251+
cl::Hidden, cl::cat(BoltCategory));
252+
253+
cl::opt<std::string>
254+
PrintOnlyFile("print-only-file",
255+
cl::desc("file with list of functions to print"), cl::Hidden,
256+
cl::cat(BoltCategory));
257+
248258
cl::opt<bool> PrintSections("print-sections",
249259
cl::desc("print all registered sections"),
250260
cl::Hidden, cl::cat(BoltCategory));

bolt/test/print-only.test

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Verify if `--print-only` and `--print-only-files` work fine.
2+
3+
# REQUIRES: system-linux
4+
5+
# RUN: %clang %cflags -x c %p/Inputs/bolt_icf.cpp -o %t -Wl,-q
6+
# RUN: llvm-bolt %t -o %t.bolt --icf=none --print-cfg \
7+
# RUN: --print-only=foo.*,bar.*,main.* 2>&1 | FileCheck %s
8+
9+
# RUN: echo "bar.*" > %t.pof
10+
# RUN: echo "main.*" >> %t.pof
11+
# RUN: llvm-bolt %t -o %t.bolt --icf=none --print-cfg \
12+
# RUN: --print-only=foo.* --print-only-file=%t.pof \
13+
# RUN: 2>&1 | FileCheck %s
14+
15+
# RUN: echo "foo.*" >> %t.pof
16+
# RUN: llvm-bolt %t -o %t.bolt --icf=none --print-cfg \
17+
# RUN: --print-only-file=%t.pof 2>&1 | FileCheck %s
18+
19+
# CHECK-NOT: Binary Function "fiz" after building cfg
20+
# CHECK-NOT: Binary Function "faz" after building cfg
21+
# CHECK-NOT: Binary Function "zip" after building cfg
22+
# CHECK-NOT: Binary Function "zap" after building cfg
23+
# CHECK: Binary Function "foo" after building cfg
24+
# CHECK: Binary Function "bar" after building cfg
25+
# CHECK: Binary Function "main" after building cfg
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
BasedOnStyle: LLVM
22
QualifierAlignment: Left
33
LineEnding: LF
4+
InsertNewlineAtEOF: true

0 commit comments

Comments
 (0)