Skip to content

Commit 5b65693

Browse files
committed
Merge remote-tracking branch 'origin/main' into lv-find-min-max-index
2 parents ad99496 + 68a7196 commit 5b65693

File tree

1,334 files changed

+63923
-19854
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,334 files changed

+63923
-19854
lines changed

.ci/all_requirements.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,6 @@ ml-dtypes==0.5.1 ; python_version < "3.13" \
194194
--hash=sha256:d13755f8e8445b3870114e5b6240facaa7cb0c3361e54beba3e07fa912a6e12b \
195195
--hash=sha256:fd918d4e6a4e0c110e2e05be7a7814d10dc1b95872accbf6512b80a109b71ae1
196196
# via -r mlir/python/requirements.txt
197-
nanobind==2.9.2 \
198-
--hash=sha256:c37957ffd5eac7eda349cff3622ecd32e5ee1244ecc912c99b5bc8188bafd16e \
199-
--hash=sha256:e7608472de99d375759814cab3e2c94aba3f9ec80e62cfef8ced495ca5c27d6e
200-
# via -r mlir/python/requirements.txt
201197
numpy==2.0.2 \
202198
--hash=sha256:0123ffdaa88fa4ab64835dcbde75dcdf89c453c922f18dced6e27c90d1d0ec5a \
203199
--hash=sha256:11a76c372d1d37437857280aa142086476136a8c0f373b2e648ab2c8f18fb195 \
@@ -299,10 +295,6 @@ pyasn1-modules==0.4.2 \
299295
--hash=sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a \
300296
--hash=sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6
301297
# via google-auth
302-
pybind11==2.13.6 \
303-
--hash=sha256:237c41e29157b962835d356b370ededd57594a26d5894a795960f0047cb5caf5 \
304-
--hash=sha256:ba6af10348c12b24e92fa086b39cfba0eff619b61ac77c406167d813b096d39a
305-
# via -r mlir/python/requirements.txt
306298
pyyaml==6.0.1 \
307299
--hash=sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5 \
308300
--hash=sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc \

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
BasedOnStyle: LLVM
2+
LineEnding: LF

.github/new-prs-labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,3 +1121,6 @@ tablegen:
11211121
- llvm/include/TableGen/**
11221122
- llvm/lib/TableGen/**
11231123
- llvm/utils/TableGen/**
1124+
1125+
infrastructure:
1126+
- .ci/**

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ jobs:
255255
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
256256
- name: Install dependencies
257257
run: |
258-
choco install -y ninja
259258
pip install psutil
260259
- name: Install a current LLVM
261260
if: ${{ matrix.mingw != true }}
@@ -281,6 +280,10 @@ jobs:
281280
- name: Set up the MSVC dev environment
282281
if: ${{ matrix.mingw != true }}
283282
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
283+
- name: Add the installed Clang at the start of the path
284+
if: ${{ matrix.mingw != true }}
285+
run: |
286+
echo "c:\Program Files\LLVM\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
284287
- name: Build and test
285288
run: |
286289
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}

.github/workflows/llvm-tests.yml renamed to .github/workflows/llvm-abi-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: LLVM Tests
1+
name: LLVM ABI Tests
22

33
permissions:
44
contents: read

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ class BinaryContext {
190190
/// Unique build ID if available for the binary.
191191
std::optional<std::string> FileBuildID;
192192

193+
/// GNU property note indicating AArch64 BTI.
194+
bool UsesBTI{false};
195+
193196
/// Set of all sections.
194197
struct CompareSections {
195198
bool operator()(const BinarySection *A, const BinarySection *B) const {
@@ -384,6 +387,9 @@ class BinaryContext {
384387
}
385388
void setFileBuildID(StringRef ID) { FileBuildID = std::string(ID); }
386389

390+
bool usesBTI() const { return UsesBTI; }
391+
void setUsesBTI(bool Value) { UsesBTI = Value; }
392+
387393
bool hasSymbolsWithFileName() const { return HasSymbolsWithFileName; }
388394
void setHasSymbolsWithFileName(bool Value) { HasSymbolsWithFileName = Value; }
389395

bolt/include/bolt/Passes/SplitFunctions.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,6 @@
1818
namespace llvm {
1919
namespace bolt {
2020

21-
/// Strategy used to partition blocks into fragments.
22-
enum SplitFunctionsStrategy : char {
23-
/// Split each function into a hot and cold fragment using profiling
24-
/// information.
25-
Profile2 = 0,
26-
/// Split each function into a hot, warm, and cold fragment using
27-
/// profiling information.
28-
CDSplit,
29-
/// Split each function into a hot and cold fragment at a randomly chosen
30-
/// split point (ignoring any available profiling information).
31-
Random2,
32-
/// Split each function into N fragments at a randomly chosen split points
33-
/// (ignoring any available profiling information).
34-
RandomN,
35-
/// Split all basic blocks of each function into fragments such that each
36-
/// fragment contains exactly a single basic block.
37-
All
38-
};
39-
4021
class SplitStrategy {
4122
public:
4223
using BlockIt = BinaryFunction::BasicBlockOrderType::iterator;

bolt/include/bolt/Rewrite/MetadataRewriters.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ std::unique_ptr<MetadataRewriter> createPseudoProbeRewriter(BinaryContext &);
2727

2828
std::unique_ptr<MetadataRewriter> createSDTRewriter(BinaryContext &);
2929

30+
std::unique_ptr<MetadataRewriter> createGNUPropertyRewriter(BinaryContext &);
31+
3032
} // namespace bolt
3133
} // namespace llvm
3234

bolt/include/bolt/Utils/CommandLineOpts.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,25 @@ enum HeatmapModeKind {
2929
HM_Optional // perf2bolt --heatmap
3030
};
3131

32+
/// Strategy used to partition blocks into fragments.
33+
enum SplitFunctionsStrategy : char {
34+
/// Split each function into a hot and cold fragment using profiling
35+
/// information.
36+
Profile2 = 0,
37+
/// Split each function into a hot, warm, and cold fragment using
38+
/// profiling information.
39+
CDSplit,
40+
/// Split each function into a hot and cold fragment at a randomly chosen
41+
/// split point (ignoring any available profiling information).
42+
Random2,
43+
/// Split each function into N fragments at a randomly chosen split points
44+
/// (ignoring any available profiling information).
45+
RandomN,
46+
/// Split all basic blocks of each function into fragments such that each
47+
/// fragment contains exactly a single basic block.
48+
All
49+
};
50+
3251
using HeatmapBlockSizes = std::vector<unsigned>;
3352
struct HeatmapBlockSpecParser : public llvm::cl::parser<HeatmapBlockSizes> {
3453
explicit HeatmapBlockSpecParser(llvm::cl::Option &O)
@@ -78,6 +97,7 @@ extern llvm::cl::opt<std::string> OutputFilename;
7897
extern llvm::cl::opt<std::string> PerfData;
7998
extern llvm::cl::opt<bool> PrintCacheMetrics;
8099
extern llvm::cl::opt<bool> PrintSections;
100+
extern llvm::cl::opt<SplitFunctionsStrategy> SplitStrategy;
81101

82102
// The format to use with -o in aggregation mode (perf2bolt)
83103
enum ProfileFormatKind { PF_Fdata, PF_YAML };

bolt/lib/Passes/LongJmp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,10 @@ void LongJmpPass::relaxLocalBranches(BinaryFunction &BF) {
895895

896896
Error LongJmpPass::runOnFunctions(BinaryContext &BC) {
897897

898+
assert((opts::CompactCodeModel ||
899+
opts::SplitStrategy != opts::SplitFunctionsStrategy::CDSplit) &&
900+
"LongJmp cannot work with functions split in more than two fragments");
901+
898902
if (opts::CompactCodeModel) {
899903
BC.outs()
900904
<< "BOLT-INFO: relaxing branches for compact code model (<128MB)\n";

0 commit comments

Comments
 (0)