Skip to content

Commit 369e4e2

Browse files
committed
Merged main:43af73f0d0c0 into amd-gfx:bedf99a6863a
Local branch amd-gfx bedf99a Merged main:3f743fd3a319 into amd-gfx:fa9cd7924a4e Remote branch main 43af73f [lit] Use raw strings for backslash escapes to fix SyntaxWarnings (llvm#70907)
2 parents 40ac47d + 43af73f commit 369e4e2

File tree

1,424 files changed

+56711
-23056
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,424 files changed

+56711
-23056
lines changed

.github/CODEOWNERS

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

3434
/lldb/ @JDevlieghere
35+
36+
/mlir/include/mlir/Interfaces/TilingInterface.* @MaheshRavishankar
37+
38+
/mlir/lib/Dialect/Linalg/Transforms/DecomposeLinalgOps.cpp @MaheshRavishankar
39+
/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp @MaheshRavishankar
40+
/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp @MaheshRavishankar
41+
/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp @MaheshRavishankar
42+
/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp @MaheshRavishankar
43+
/mlir/lib/Interfaces/TilingInterface.* @MaheshRavishankar
44+
45+
# SPIR-V in MLIR.
46+
/mlir/**/SPIRV/ @antiagainst @kuhar
47+
/mlir/**/SPIRVTo*/ @antiagainst @kuhar
48+
/mlir/**/*ToSPIRV/ @antiagainst @kuhar
49+
/mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp @antiagainst @kuhar

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

.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/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/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.

bolt/lib/Core/BinaryContext.cpp

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,10 +1926,27 @@ BinaryContext::getBaseAddressForMapping(uint64_t MMapAddress,
19261926
// Find a segment with a matching file offset.
19271927
for (auto &KV : SegmentMapInfo) {
19281928
const SegmentInfo &SegInfo = KV.second;
1929-
if (alignDown(SegInfo.FileOffset, SegInfo.Alignment) == FileOffset) {
1930-
// Use segment's aligned memory offset to calculate the base address.
1931-
const uint64_t MemOffset = alignDown(SegInfo.Address, SegInfo.Alignment);
1932-
return MMapAddress - MemOffset;
1929+
// FileOffset is got from perf event,
1930+
// and it is equal to alignDown(SegInfo.FileOffset, pagesize).
1931+
// If the pagesize is not equal to SegInfo.Alignment.
1932+
// FileOffset and SegInfo.FileOffset should be aligned first,
1933+
// and then judge whether they are equal.
1934+
if (alignDown(SegInfo.FileOffset, SegInfo.Alignment) ==
1935+
alignDown(FileOffset, SegInfo.Alignment)) {
1936+
// The function's offset from base address in VAS is aligned by pagesize
1937+
// instead of SegInfo.Alignment. Pagesize can't be got from perf events.
1938+
// However, The ELF document says that SegInfo.FileOffset should equal
1939+
// to SegInfo.Address, modulo the pagesize.
1940+
// Reference: https://refspecs.linuxfoundation.org/elf/elf.pdf
1941+
1942+
// So alignDown(SegInfo.Address, pagesize) can be calculated by:
1943+
// alignDown(SegInfo.Address, pagesize)
1944+
// = SegInfo.Address - (SegInfo.Address % pagesize)
1945+
// = SegInfo.Address - (SegInfo.FileOffset % pagesize)
1946+
// = SegInfo.Address - SegInfo.FileOffset +
1947+
// alignDown(SegInfo.FileOffset, pagesize)
1948+
// = SegInfo.Address - SegInfo.FileOffset + FileOffset
1949+
return MMapAddress - (SegInfo.Address - SegInfo.FileOffset + FileOffset);
19331950
}
19341951
}
19351952

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 1 addition & 8 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;
@@ -432,8 +430,6 @@ void BinaryFunction::print(raw_ostream &OS, std::string Annotation) {
432430
OS << "\n IsSplit : " << isSplit();
433431
OS << "\n BB Count : " << size();
434432

435-
if (HasFixedIndirectBranch)
436-
OS << "\n HasFixedIndirectBranch : true";
437433
if (HasUnknownControlFlow)
438434
OS << "\n Unknown CF : true";
439435
if (getPersonalityFunction())
@@ -1118,7 +1114,7 @@ void BinaryFunction::handleIndirectBranch(MCInst &Instruction, uint64_t Size,
11181114
Instruction.clear();
11191115
MIB->createUncondBranch(Instruction, TargetSymbol, BC.Ctx.get());
11201116
TakenBranches.emplace_back(Offset, IndirectTarget - getAddress());
1121-
HasFixedIndirectBranch = true;
1117+
addEntryPointAtOffset(IndirectTarget - getAddress());
11221118
} else {
11231119
MIB->convertJmpToTailCall(Instruction);
11241120
BC.addInterproceduralReference(this, IndirectTarget);
@@ -1894,9 +1890,6 @@ bool BinaryFunction::postProcessIndirectBranches(
18941890
LastIndirectJumpBB->updateJumpTableSuccessors();
18951891
}
18961892

1897-
if (HasFixedIndirectBranch)
1898-
return false;
1899-
19001893
// Validate that all data references to function offsets are claimed by
19011894
// recognized jump tables. Register externally referenced blocks as entry
19021895
// points.

0 commit comments

Comments
 (0)