Skip to content

Commit 4532a04

Browse files
authored
Merge branch 'main' into lialan/dynamic_masked_load
2 parents 21bd52c + 8941f89 commit 4532a04

File tree

4,138 files changed

+241829
-183043
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,138 files changed

+241829
-183043
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp @MaheshRavishankar @nicolasvasilache
6969
/mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp @hanhanW @nicolasvasilache
7070
/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp @dcaballe @hanhanW @nicolasvasilache
71-
/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp @banach-space @dcaballe @hanhanW @nicolasvasilache
71+
/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp @banach-space @dcaballe @hanhanW @nicolasvasilache @Groverkss
7272

7373
# MemRef Dialect in MLIR.
7474
/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp @MaheshRavishankar @nicolasvasilache
@@ -82,9 +82,9 @@
8282
/mlir/**/*VectorToSCF* @banach-space @dcaballe @matthias-springer @nicolasvasilache
8383
/mlir/**/*VectorToLLVM* @banach-space @dcaballe @nicolasvasilache
8484
/mlir/**/*X86Vector* @aartbik @dcaballe @nicolasvasilache
85-
/mlir/include/mlir/Dialect/Vector @banach-space @dcaballe @nicolasvasilache
85+
/mlir/include/mlir/Dialect/Vector @banach-space @dcaballe @nicolasvasilache @Groverkss
8686
/mlir/include/mlir/Dialect/Vector/IR @kuhar
87-
/mlir/lib/Dialect/Vector @banach-space @dcaballe @nicolasvasilache
87+
/mlir/lib/Dialect/Vector @banach-space @dcaballe @nicolasvasilache @Groverkss
8888
/mlir/lib/Dialect/Vector/Transforms/* @banach-space @dcaballe @hanhanW @nicolasvasilache
8989
/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp @banach-space @dcaballe @MaheshRavishankar @nicolasvasilache
9090
/mlir/**/*EmulateNarrowType* @dcaballe @hanhanW
@@ -141,7 +141,7 @@
141141
/clang/tools/clang-installapi/ @cyndyishida
142142

143143
# ExtractAPI
144-
/clang/**/ExtractAPI @daniel-grumberg
144+
/clang/**/ExtractAPI @daniel-grumberg @QuietMisdreavus
145145

146146
# DWARFLinker, dwarfutil, dsymutil
147147
/llvm/**/DWARFLinker/ @JDevlieghere

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ env:
4949
jobs:
5050
stage1:
5151
if: github.repository_owner == 'llvm'
52-
runs-on: libcxx-runners-8-set
52+
runs-on: libcxx-runners-set
53+
container: ghcr.io/libcxx/actions-builder:testing-2024-09-21
5354
continue-on-error: false
5455
strategy:
5556
fail-fast: false
@@ -85,7 +86,8 @@ jobs:
8586
**/crash_diagnostics/*
8687
stage2:
8788
if: github.repository_owner == 'llvm'
88-
runs-on: libcxx-runners-8-set
89+
runs-on: libcxx-runners-set
90+
container: ghcr.io/libcxx/actions-builder:testing-2024-09-21
8991
needs: [ stage1 ]
9092
continue-on-error: false
9193
strategy:
@@ -157,25 +159,23 @@ jobs:
157159
'generic-no-rtti',
158160
'generic-optimized-speed',
159161
'generic-static',
160-
# TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
161-
# or don't provide much value since the benchmark run results are too noise on the bots.
162-
'benchmarks',
163162
'bootstrapping-build'
164163
]
165-
machine: [ 'libcxx-runners-8-set' ]
164+
machine: [ 'libcxx-runners-set' ]
166165
include:
167166
- config: 'generic-cxx26'
168-
machine: libcxx-runners-8-set
167+
machine: libcxx-runners-set
169168
- config: 'generic-asan'
170-
machine: libcxx-runners-8-set
169+
machine: libcxx-runners-set
171170
- config: 'generic-tsan'
172-
machine: libcxx-runners-8-set
171+
machine: libcxx-runners-set
173172
- config: 'generic-ubsan'
174-
machine: libcxx-runners-8-set
173+
machine: libcxx-runners-set
175174
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
176175
- config: 'generic-msan'
177-
machine: libcxx-runners-8-set
176+
machine: libcxx-runners-set
178177
runs-on: ${{ matrix.machine }}
178+
container: ghcr.io/libcxx/actions-builder:testing-2024-09-21
179179
steps:
180180
- uses: actions/checkout@v4
181181
- name: ${{ matrix.config }}

bolt/include/bolt/Core/BinaryBasicBlock.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,9 @@ class BinaryBasicBlock {
819819
return OutputAddressRange;
820820
}
821821

822+
uint64_t getOutputStartAddress() const { return OutputAddressRange.first; }
823+
uint64_t getOutputEndAddress() const { return OutputAddressRange.second; }
824+
822825
bool hasLocSyms() const { return LocSyms != nullptr; }
823826

824827
/// Return mapping of input offsets to symbols in the output.

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,10 @@ class BinaryFunction {
908908
return BB && BB->getOffset() == Offset ? BB : nullptr;
909909
}
910910

911+
const BinaryBasicBlock *getBasicBlockAtOffset(uint64_t Offset) const {
912+
return const_cast<BinaryFunction *>(this)->getBasicBlockAtOffset(Offset);
913+
}
914+
911915
/// Retrieve the landing pad BB associated with invoke instruction \p Invoke
912916
/// that is in \p BB. Return nullptr if none exists
913917
BinaryBasicBlock *getLandingPadBBFor(const BinaryBasicBlock &BB,

bolt/include/bolt/Core/FunctionLayout.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ class FunctionFragment {
123123
const_iterator begin() const;
124124
iterator end();
125125
const_iterator end() const;
126-
const BinaryBasicBlock *front() const;
126+
BinaryBasicBlock *front() const;
127+
BinaryBasicBlock *back() const;
127128

128129
friend class FunctionLayout;
129130
};

bolt/include/bolt/Passes/LongJmp.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@ class LongJmpPass : public BinaryFunctionPass {
6363
uint32_t NumColdStubs{0};
6464
uint32_t NumSharedStubs{0};
6565

66+
/// The shortest distance for any branch instruction on AArch64.
67+
static constexpr size_t ShortestJumpBits = 16;
68+
static constexpr size_t ShortestJumpSpan = 1ULL << (ShortestJumpBits - 1);
69+
70+
/// The longest single-instruction branch.
71+
static constexpr size_t LongestJumpBits = 28;
72+
static constexpr size_t LongestJumpSpan = 1ULL << (LongestJumpBits - 1);
73+
74+
/// Relax all internal function branches including those between fragments.
75+
/// Assume that fragments are placed in different sections but are within
76+
/// 128MB of each other.
77+
void relaxLocalBranches(BinaryFunction &BF);
78+
6679
/// -- Layout estimation methods --
6780
/// Try to do layout before running the emitter, by looking at BinaryFunctions
6881
/// and MCInsts -- this is an estimation. To be correct for longjmp inserter

bolt/include/bolt/Profile/DataAggregator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ class DataAggregator : public DataReader {
266266
uint64_t Mispreds);
267267

268268
/// Register a \p Branch.
269-
bool doBranch(uint64_t From, uint64_t To, uint64_t Count, uint64_t Mispreds);
269+
bool doBranch(uint64_t From, uint64_t To, uint64_t Count, uint64_t Mispreds,
270+
bool IsPreagg);
270271

271272
/// Register a trace between two LBR entries supplied in execution order.
272273
bool doTrace(const LBREntry &First, const LBREntry &Second,

bolt/include/bolt/Profile/YAMLProfileReader.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class YAMLProfileReader : public ProfileReaderBase {
105105
yaml::bolt::BinaryProfile YamlBP;
106106

107107
/// Map a function ID from a YAML profile to a BinaryFunction object.
108-
std::vector<BinaryFunction *> YamlProfileToFunction;
108+
DenseMap<uint32_t, BinaryFunction *> YamlProfileToFunction;
109109

110110
using FunctionSet = std::unordered_set<const BinaryFunction *>;
111111
/// To keep track of functions that have a matched profile before the profile
@@ -162,8 +162,6 @@ class YAMLProfileReader : public ProfileReaderBase {
162162
/// Update matched YAML -> BinaryFunction pair.
163163
void matchProfileToFunction(yaml::bolt::BinaryFunctionProfile &YamlBF,
164164
BinaryFunction &BF) {
165-
if (YamlBF.Id >= YamlProfileToFunction.size())
166-
YamlProfileToFunction.resize(YamlBF.Id + 1);
167165
YamlProfileToFunction[YamlBF.Id] = &BF;
168166
YamlBF.Used = true;
169167

bolt/lib/Core/FunctionLayout.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ FunctionFragment::const_iterator FunctionFragment::end() const {
3333
return const_iterator(Layout->block_begin() + StartIndex + Size);
3434
}
3535

36-
const BinaryBasicBlock *FunctionFragment::front() const { return *begin(); }
36+
BinaryBasicBlock *FunctionFragment::front() const { return *begin(); }
37+
38+
BinaryBasicBlock *FunctionFragment::back() const { return *std::prev(end()); }
3739

3840
FunctionLayout::FunctionLayout() { addFragment(); }
3941

0 commit comments

Comments
 (0)