Skip to content

Commit ff4fdca

Browse files
committed
LLVM and SPIRV-LLVM-Translator pulldown (WW47)
LLVM: llvm/llvm-project@752c21b SPIRV-LLVM-Translator: KhronosGroup/SPIRV-LLVM-Translator@f18e64d
2 parents 62690ad + 8cc6e9e commit ff4fdca

File tree

1,543 files changed

+71303
-30408
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,543 files changed

+71303
-30408
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
- 'openmp/docs/**'
2525
- 'polly/docs/**'
2626
- 'flang/docs/**'
27+
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
2728
pull_request:
2829
paths:
2930
- 'llvm/docs/**'
@@ -37,6 +38,7 @@ on:
3738
- 'openmp/docs/**'
3839
- 'polly/docs/**'
3940
- 'flang/docs/**'
41+
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
4042

4143
jobs:
4244
check-docs-build:
@@ -80,6 +82,7 @@ jobs:
8082
- 'polly/docs/**'
8183
flang:
8284
- 'flang/docs/**'
85+
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
8386
- name: Fetch LLVM sources (PR)
8487
if: ${{ github.event_name == 'pull_request' }}
8588
uses: actions/checkout@v4
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# This file defines pre-commit CI for libc++, libc++abi, and libunwind (on Github).
2+
#
3+
# We split the configurations in multiple stages with the intent of saving compute time
4+
# when a job fails early in the pipeline. This is why the jobs are marked as `continue-on-error: false`.
5+
# We try to run the CI configurations with the most signal in the first stage.
6+
#
7+
# Stages 1 & 2 are meant to be "smoke tests", and are meant to catch most build/test failures quickly and without using
8+
# too many resources.
9+
# Stage 3 is "everything else", and is meant to catch breakages on more niche or unique configurations.
10+
#
11+
# Therefore, we "fail-fast" for any failures during stages 1 & 2, meaning any job failing cancels all other running jobs,
12+
# under the assumption that if the "smoke tests" fail, then the other configurations will likely fail in the same way.
13+
# However, stage 3 does not fail fast, as it's more likely that any one job failing is a flake or a configuration-specific
14+
#
15+
name: Build and Test libc++
16+
on:
17+
pull_request:
18+
paths:
19+
- 'libcxx/**'
20+
- 'libcxxabi/**'
21+
- 'libunwind/**'
22+
- 'runtimes/**'
23+
- 'cmake/**'
24+
- '.github/workflows/libcxx-build-and-test.yaml'
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
28+
cancel-in-progress: true
29+
30+
31+
env:
32+
CMAKE: "/opt/bin/cmake"
33+
# LLVM POST-BRANCH bump version
34+
# LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17"
35+
# LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15"
36+
LLVM_HEAD_VERSION: "18" # Used compiler, update POST-BRANCH.
37+
LLVM_PREVIOUS_VERSION: "17"
38+
LLVM_OLDEST_VERSION: "16"
39+
GCC_STABLE_VERSION: "13"
40+
LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-18"
41+
CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics"
42+
43+
44+
jobs:
45+
stage1:
46+
if: github.repository_owner == 'llvm'
47+
runs-on:
48+
group: libcxx-runners-8
49+
continue-on-error: false
50+
strategy:
51+
fail-fast: true
52+
matrix:
53+
config: [
54+
'generic-cxx03',
55+
'generic-cxx26',
56+
'generic-modules'
57+
]
58+
cc: [ 'clang-18' ]
59+
cxx: [ 'clang++-18' ]
60+
clang_tidy: [ 'ON' ]
61+
include:
62+
- config: 'generic-gcc'
63+
cc: 'gcc-13'
64+
cxx: 'g++-13'
65+
clang_tidy: 'OFF'
66+
steps:
67+
- uses: actions/checkout@v4
68+
- name: ${{ matrix.config }}.${{ matrix.cxx }}
69+
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
70+
env:
71+
CC: ${{ matrix.cc }}
72+
CXX: ${{ matrix.cxx }}
73+
ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
74+
- uses: actions/upload-artifact@v3
75+
if: always()
76+
with:
77+
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
78+
path: |
79+
**/test-results.xml
80+
**/*.abilist
81+
**/CMakeError.log
82+
**/CMakeOutput.log
83+
**/crash_diagnostics/*
84+
stage2:
85+
if: github.repository_owner == 'llvm'
86+
runs-on:
87+
group: libcxx-runners-8
88+
needs: [ stage1 ]
89+
continue-on-error: false
90+
strategy:
91+
fail-fast: true
92+
matrix:
93+
config: [
94+
'generic-cxx11',
95+
'generic-cxx14',
96+
'generic-cxx17',
97+
'generic-cxx20',
98+
'generic-cxx23'
99+
]
100+
cc: [ 'clang-18' ]
101+
cxx: [ 'clang++-18' ]
102+
clang_tidy: [ 'ON' ]
103+
include:
104+
- config: 'generic-gcc-cxx11'
105+
cc: 'gcc-13'
106+
cxx: 'g++-13'
107+
clang_tidy: 'OFF'
108+
- config: 'generic-cxx23'
109+
cc: 'clang-16'
110+
cxx: 'clang++-16'
111+
clang_tidy: 'OFF'
112+
- config: 'generic-cxx23'
113+
cc: 'clang-17'
114+
cxx: 'clang++-17'
115+
clang_tidy: 'OFF'
116+
steps:
117+
- uses: actions/checkout@v4
118+
- name: ${{ matrix.config }}
119+
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
120+
env:
121+
CC: ${{ matrix.cc }}
122+
CXX: ${{ matrix.cxx }}
123+
ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
124+
- uses: actions/upload-artifact@v3
125+
if: always() # Upload artifacts even if the build or test suite fails
126+
with:
127+
name: ${{ matrix.config }}-results
128+
path: |
129+
**/test-results.xml
130+
**/*.abilist
131+
**/CMakeError.log
132+
**/CMakeOutput.log
133+
**/crash_diagnostics/*
134+
stage3:
135+
if: github.repository_owner == 'llvm'
136+
needs: [ stage1, stage2 ]
137+
continue-on-error: false
138+
strategy:
139+
fail-fast: false
140+
max-parallel: 8
141+
matrix:
142+
config: [
143+
'generic-abi-unstable',
144+
'generic-hardening-mode-debug',
145+
'generic-hardening-mode-extensive',
146+
'generic-hardening-mode-fast',
147+
'generic-hardening-mode-fast-with-abi-breaks',
148+
'generic-merged',
149+
'generic-modules-lsv',
150+
'generic-no-exceptions',
151+
'generic-no-experimental',
152+
'generic-no-filesystem',
153+
'generic-no-localization',
154+
'generic-no-random_device',
155+
'generic-no-threads',
156+
'generic-no-tzdb',
157+
'generic-no-unicode',
158+
'generic-no-wide-characters',
159+
'generic-static',
160+
'generic-with_llvm_unwinder'
161+
]
162+
machine: [ 'libcxx-runners-8' ]
163+
std_modules: [ 'OFF' ]
164+
include:
165+
- config: 'generic-cxx26'
166+
machine: libcxx-runners-8
167+
std_modules: 'ON'
168+
- config: 'generic-asan'
169+
machine: libcxx-runners-8
170+
std_modules: 'OFF'
171+
- config: 'generic-tsan'
172+
machine: libcxx-runners-8
173+
std_modules: 'OFF'
174+
- config: 'generic-ubsan'
175+
machine: libcxx-runners-8
176+
std_modules: 'OFF'
177+
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
178+
- config: 'generic-msan'
179+
machine: libcxx-runners-32
180+
std_modules: 'OFF'
181+
runs-on:
182+
group: ${{ matrix.machine }}
183+
steps:
184+
- uses: actions/checkout@v4
185+
- name: ${{ matrix.config }}
186+
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
187+
env:
188+
CC: clang-18
189+
CXX: clang++-18
190+
ENABLE_CLANG_TIDY: "OFF"
191+
ENABLE_STD_MODULES: ${{ matrix.std_modules }}
192+
- uses: actions/upload-artifact@v3
193+
if: always()
194+
with:
195+
name: ${{ matrix.config }}-results
196+
path: |
197+
**/test-results.xml
198+
**/*.abilist
199+
**/CMakeError.log
200+
**/CMakeOutput.log
201+
**/crash_diagnostics/*
202+

.github/workflows/release-binaries.yml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,52 @@ jobs:
5757
fi
5858
bash .github/workflows/set-release-binary-outputs.sh "${{ github.actor }}" "$tag" "$upload"
5959
60+
# Try to get around the 6 hour timeout by first running a job to fill
61+
# the build cache.
62+
fill-cache:
63+
name: "Fill Cache ${{ matrix.os }}"
64+
needs: prepare
65+
runs-on: ${{ matrix.os }}
66+
strategy:
67+
matrix:
68+
os:
69+
- ubuntu-22.04
70+
steps:
71+
- name: Checkout LLVM
72+
uses: actions/checkout@v4
73+
with:
74+
ref: ${{ inputs.tag || github.ref_name }}
75+
76+
- name: Install Ninja
77+
uses: llvm/actions/install-ninja@main
78+
79+
- name: Setup sccache
80+
uses: hendrikmuhs/ccache-action@v1
81+
with:
82+
max-size: 250M
83+
key: sccache-${{ matrix.os }}-release
84+
variant: sccache
85+
86+
- name: Build Clang
87+
run: |
88+
cmake -G Ninja -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE=Release -DCMAKE_ENABLE_ASSERTIONS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DLLVM_ENABLE_PROJECTS=clang -S llvm -B build
89+
ninja -v -C build
90+
91+
6092
build-binaries:
6193
name: ${{ matrix.target.triple }}
6294
permissions:
6395
contents: write # To upload assets to release.
64-
needs: prepare
96+
needs:
97+
- prepare
98+
- fill-cache
6599
runs-on: ${{ matrix.target.runs-on }}
66100
strategy:
67101
fail-fast: false
68102
matrix:
69103
target:
70104
- triple: x86_64-linux-gnu-ubuntu-22.04
105+
os: ubuntu-22.04
71106
runs-on: ubuntu-22.04-16x64
72107
debian-build-deps: >
73108
chrpath
@@ -81,6 +116,14 @@ jobs:
81116
ref: ${{ needs.prepare.outputs.ref }}
82117
path: ${{ needs.prepare.outputs.build-dir }}/llvm-project
83118

119+
- name: Setup sccache
120+
uses: hendrikmuhs/ccache-action@v1
121+
with:
122+
max-size: 250M
123+
key: sccache-${{ matrix.target.os }}-release
124+
save: false
125+
variant: sccache
126+
84127
- name: Install Brew build dependencies
85128
if: matrix.target.brew-build-deps != ''
86129
run: brew install ${{ matrix.target.brew-build-deps }}
@@ -102,7 +145,8 @@ jobs:
102145
-triple ${{ matrix.target.triple }} \
103146
-use-ninja \
104147
-no-checkout \
105-
-no-test-suite
148+
-no-test-suite \
149+
-configure-flags "-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
106150
107151
- name: Upload binaries
108152
if: ${{ always() && needs.prepare.outputs.upload == 'true' }}

.github/workflows/scorecard.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
analysis:
2323
name: Scorecard analysis
2424
runs-on: ubuntu-latest
25+
if: github.repository == 'llvm/llvm-project'
2526
permissions:
2627
# Needed to upload the results to code-scanning dashboard.
2728
security-events: write

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
3535
3636
37+
3738
LLVM GN Syncbot <[email protected]>
3839
Martin Storsjö <[email protected]>
3940
Med Ismail Bennani <[email protected]> <[email protected]>

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,9 @@ class BinaryContext {
12901290
/// Return true if the function should be emitted to the output file.
12911291
bool shouldEmit(const BinaryFunction &Function) const;
12921292

1293+
/// Dump the assembly representation of MCInst to debug output.
1294+
void dump(const MCInst &Inst) const;
1295+
12931296
/// Print the string name for a CFI operation.
12941297
static void printCFI(raw_ostream &OS, const MCCFIInstruction &Inst);
12951298

bolt/lib/Core/BinaryContext.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,15 @@ bool BinaryContext::shouldEmit(const BinaryFunction &Function) const {
17381738
return HasRelocations || Function.isSimple();
17391739
}
17401740

1741+
void BinaryContext::dump(const MCInst &Inst) const {
1742+
if (LLVM_UNLIKELY(!InstPrinter)) {
1743+
dbgs() << "Cannot dump for InstPrinter is not initialized.\n";
1744+
return;
1745+
}
1746+
InstPrinter->printInst(&Inst, 0, "", *STI, dbgs());
1747+
dbgs() << "\n";
1748+
}
1749+
17411750
void BinaryContext::printCFI(raw_ostream &OS, const MCCFIInstruction &Inst) {
17421751
uint32_t Operation = Inst.getOperation();
17431752
switch (Operation) {

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ namespace opts {
5454

5555
extern cl::OptionCategory BoltCategory;
5656
extern cl::OptionCategory BoltOptCategory;
57-
extern cl::OptionCategory BoltRelocCategory;
5857

5958
extern cl::opt<bool> EnableBAT;
6059
extern cl::opt<bool> Instrument;
61-
extern cl::opt<bool> KeepNops;
6260
extern cl::opt<bool> StrictMode;
6361
extern cl::opt<bool> UpdateDebugSections;
6462
extern cl::opt<unsigned> Verbosity;

0 commit comments

Comments
 (0)