Skip to content

Commit 0ec28bc

Browse files
authored
Merge branch 'llvm:main' into pr-local-function-assert-fix
2 parents 14901a7 + 33e41c4 commit 0ec28bc

File tree

1,655 files changed

+57992
-23255
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,655 files changed

+57992
-23255
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@
3232
/clang/www/make_cxx_dr_status @Endilll
3333

3434
/lldb/ @JDevlieghere
35+
36+
# SPIR-V in MLIR.
37+
/mlir/**/SPIRV/ @antiagainst @kuhar
38+
/mlir/**/SPIRVTo*/ @antiagainst @kuhar
39+
/mlir/**/*ToSPIRV/ @antiagainst @kuhar
40+
/mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp @antiagainst @kuhar

.github/new-prs-labeler.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
clang:dataflow:
2-
- clang/**/Analysis/**/*
2+
- clang/include/clang/Analysis/FlowSensitive/**/*
3+
- clang/lib/Analysis/FlowSensitive/**/*
4+
- clang/unittests/Analysis/FlowSensitive/**/*
5+
- clang/docs/DataFlowAnalysisIntro.md
6+
- clang/docs/DataFlowAnalysisIntroImages/**/*
37

48
clang:frontend:
59
- clang/lib/AST/**/*

.github/workflows/issue-subscriber.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
steps:
1616
- name: Setup Automation Script
1717
run: |
18-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/"$GITHUB_SHA"/llvm/utils/git/github-automation.py
19-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/"$GITHUB_SHA"/llvm/utils/git/requirements.txt
18+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/"$GITHUB_SHA"/llvm/utils/git/github-automation.py
19+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/"$GITHUB_SHA"/llvm/utils/git/requirements.txt
2020
chmod a+x github-automation.py
2121
pip install -r requirements.txt
2222
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
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+
runs-on: libcxx-runners-16
47+
continue-on-error: false
48+
strategy:
49+
fail-fast: true
50+
matrix:
51+
config: [
52+
'generic-cxx03',
53+
'generic-cxx26',
54+
'generic-modules'
55+
]
56+
cc: [ 'clang-18' ]
57+
cxx: [ 'clang++-18' ]
58+
clang_tidy: [ 'ON' ]
59+
include:
60+
- config: 'generic-gcc'
61+
cc: 'gcc-13'
62+
cxx: 'g++-13'
63+
clang_tidy: 'OFF'
64+
steps:
65+
- uses: actions/checkout@v4
66+
- name: ${{ matrix.config }}.${{ matrix.cxx }}
67+
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
68+
env:
69+
CC: ${{ matrix.cc }}
70+
CXX: ${{ matrix.cxx }}
71+
ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
72+
- uses: actions/upload-artifact@v3
73+
if: always()
74+
with:
75+
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
76+
path: |
77+
**/test-results.xml
78+
**/*.abilist
79+
**/CMakeError.log
80+
**/CMakeOutput.log
81+
**/crash_diagnostics/*
82+
stage2:
83+
runs-on: libcxx-runners-8
84+
needs: [ stage1 ]
85+
continue-on-error: false
86+
strategy:
87+
fail-fast: true
88+
matrix:
89+
config: [
90+
'generic-cxx11',
91+
'generic-cxx14',
92+
'generic-cxx17',
93+
'generic-cxx20',
94+
'generic-cxx23'
95+
]
96+
cc: [ 'clang-18' ]
97+
cxx: [ 'clang++-18' ]
98+
clang_tidy: [ 'ON' ]
99+
include:
100+
- config: 'generic-gcc-cxx11'
101+
cc: 'gcc-13'
102+
cxx: 'g++-13'
103+
clang_tidy: 'OFF'
104+
- config: 'generic-cxx23'
105+
cc: 'clang-16'
106+
cxx: 'clang++-16'
107+
clang_tidy: 'OFF'
108+
- config: 'generic-cxx23'
109+
cc: 'clang-17'
110+
cxx: 'clang++-17'
111+
clang_tidy: 'OFF'
112+
steps:
113+
- uses: actions/checkout@v4
114+
- name: ${{ matrix.config }}
115+
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
116+
env:
117+
CC: ${{ matrix.cc }}
118+
CXX: ${{ matrix.cxx }}
119+
ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
120+
- uses: actions/upload-artifact@v3
121+
if: always() # Upload artifacts even if the build or test suite fails
122+
with:
123+
name: ${{ matrix.config }}-results
124+
path: |
125+
**/test-results.xml
126+
**/*.abilist
127+
**/CMakeError.log
128+
**/CMakeOutput.log
129+
**/crash_diagnostics/*
130+
stage3:
131+
needs: [ stage1, stage2 ]
132+
continue-on-error: false
133+
strategy:
134+
fail-fast: false
135+
max-parallel: 8
136+
matrix:
137+
config: [
138+
'generic-abi-unstable',
139+
'generic-hardening-mode-debug',
140+
'generic-hardening-mode-extensive',
141+
'generic-hardening-mode-fast',
142+
'generic-hardening-mode-fast-with-abi-breaks',
143+
'generic-merged',
144+
'generic-modules-lsv',
145+
'generic-no-exceptions',
146+
'generic-no-experimental',
147+
'generic-no-filesystem',
148+
'generic-no-localization',
149+
'generic-no-random_device',
150+
'generic-no-threads',
151+
'generic-no-tzdb',
152+
'generic-no-unicode',
153+
'generic-no-wide-characters',
154+
'generic-static',
155+
'generic-with_llvm_unwinder'
156+
]
157+
machine: [ 'libcxx-runners-8' ]
158+
std_modules: [ 'OFF' ]
159+
include:
160+
- config: 'generic-cxx26'
161+
machine: libcxx-runners-8
162+
std_modules: 'ON'
163+
- config: 'generic-asan'
164+
machine: libcxx-runners-16
165+
std_modules: 'OFF'
166+
- config: 'generic-tsan'
167+
machine: libcxx-runners-16
168+
std_modules: 'OFF'
169+
- config: 'generic-ubsan'
170+
machine: libcxx-runners-8
171+
std_modules: 'OFF'
172+
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
173+
- config: 'generic-msan'
174+
machine: libcxx-runners-30
175+
std_modules: 'OFF'
176+
runs-on: ${{ matrix.machine }}
177+
steps:
178+
- uses: actions/checkout@v4
179+
- name: ${{ matrix.config }}
180+
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
181+
env:
182+
CC: clang-18
183+
CXX: clang++-18
184+
ENABLE_CLANG_TIDY: "OFF"
185+
ENABLE_STD_MODULES: ${{ matrix.std_modules }}
186+
- uses: actions/upload-artifact@v3
187+
if: always()
188+
with:
189+
name: ${{ matrix.config }}-results
190+
path: |
191+
**/test-results.xml
192+
**/*.abilist
193+
**/CMakeError.log
194+
**/CMakeOutput.log
195+
**/crash_diagnostics/*
196+

.github/workflows/pr-subscriber.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ jobs:
1515
steps:
1616
- name: Setup Automation Script
1717
run: |
18-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/github-automation.py
19-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/requirements.txt
20-
curl -O -L https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/.github/workflows/pr-subscriber-wait.py
18+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/github-automation.py
19+
curl -O -L --fail https://raw.githubusercontent.com/"$GITHUB_REPOSITORY"/main/llvm/utils/git/requirements.txt
2120
chmod a+x github-automation.py
2221
pip install -r requirements.txt
2322

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,8 +1239,8 @@ class BinaryContext {
12391239
uint64_t
12401240
computeInstructionSize(const MCInst &Inst,
12411241
const MCCodeEmitter *Emitter = nullptr) const {
1242-
if (auto Size = MIB->getAnnotationWithDefault<uint32_t>(Inst, "Size"))
1243-
return Size;
1242+
if (std::optional<uint32_t> Size = MIB->getSize(Inst))
1243+
return *Size;
12441244

12451245
if (!Emitter)
12461246
Emitter = this->MCE.get();

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,6 @@ class BinaryFunction {
319319
/// Execution halts whenever this function is entered.
320320
bool TrapsOnEntry{false};
321321

322-
/// True if the function had an indirect branch with a fixed internal
323-
/// destination.
324-
bool HasFixedIndirectBranch{false};
325-
326322
/// True if the function is a fragment of another function. This means that
327323
/// this function could only be entered via its parent or one of its sibling
328324
/// fragments. It could be entered at any basic block. It can also return

bolt/include/bolt/Core/MCPlus.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class MCAnnotation {
7272
kConditionalTailCall, /// CTC.
7373
kOffset, /// Offset in the function.
7474
kLabel, /// MCSymbol pointing to this instruction.
75+
kSize, /// Size of the instruction.
7576
kGeneric /// First generic annotation.
7677
};
7778

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,12 @@ class MCPlusBuilder {
11791179
/// is emitted to MCStreamer.
11801180
bool setLabel(MCInst &Inst, MCSymbol *Label) const;
11811181

1182+
/// Get instruction size specified via annotation.
1183+
std::optional<uint32_t> getSize(const MCInst &Inst) const;
1184+
1185+
/// Set instruction size.
1186+
void setSize(MCInst &Inst, uint32_t Size) const;
1187+
11821188
/// Return MCSymbol that represents a target of this instruction at a given
11831189
/// operand number \p OpNum. If there's no symbol associated with
11841190
/// the operand - return nullptr.

bolt/include/bolt/Rewrite/RewriteInstance.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,6 @@ class RewriteInstance {
400400
/// Manage a pipeline of metadata handlers.
401401
class MetadataManager MetadataManager;
402402

403-
/// Get the contents of the LSDA section for this binary.
404-
ArrayRef<uint8_t> getLSDAData();
405-
406-
/// Get the mapped address of the LSDA section for this binary.
407-
uint64_t getLSDAAddress();
408-
409403
static const char TimerGroupName[];
410404

411405
static const char TimerGroupDesc[];
@@ -550,7 +544,6 @@ class RewriteInstance {
550544
}
551545

552546
/// Exception handling and stack unwinding information in this binary.
553-
ErrorOr<BinarySection &> LSDASection{std::errc::bad_address};
554547
ErrorOr<BinarySection &> EHFrameSection{std::errc::bad_address};
555548

556549
/// .note.gnu.build-id section.

0 commit comments

Comments
 (0)