Skip to content

Commit 844906c

Browse files
committed
Merge remote-tracking branch 'origin/main' into midhun7/big-archive-recognition
2 parents ca85990 + a638f88 commit 844906c

File tree

4,228 files changed

+278949
-110483
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,228 files changed

+278949
-110483
lines changed

.ci/all_requirements.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ 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.7.0 \
198-
--hash=sha256:73b12d0e751d140d6c1bf4b215e18818a8debfdb374f08dc3776ad208d808e74 \
199-
--hash=sha256:f9f1b160580c50dcf37b6495a0fd5ec61dc0d95dae5f8004f87dd9ad7eb46b34
197+
nanobind==2.9.2 \
198+
--hash=sha256:c37957ffd5eac7eda349cff3622ecd32e5ee1244ecc912c99b5bc8188bafd16e \
199+
--hash=sha256:e7608472de99d375759814cab3e2c94aba3f9ec80e62cfef8ced495ca5c27d6e
200200
# via -r mlir/python/requirements.txt
201201
numpy==2.0.2 \
202202
--hash=sha256:0123ffdaa88fa4ab64835dcbde75dcdf89c453c922f18dced6e27c90d1d0ec5a \
@@ -383,6 +383,10 @@ swig==4.3.1 \
383383
--hash=sha256:efec16327029f682f649a26da726bb0305be8800bd0f1fa3e81bf0769cf5b476 \
384384
--hash=sha256:fc496c0d600cf1bb2d91e28d3d6eae9c4301e5ea7a0dec5a4281b5efed4245a8
385385
# via -r lldb/test/requirements.txt
386+
typing-extensions==4.15.0 \
387+
--hash=sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466 \
388+
--hash=sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548
389+
# via -r mlir/python/requirements.txt
386390
urllib3==2.5.0 \
387391
--hash=sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760 \
388392
--hash=sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc

.ci/cache_lit_timing_files.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,16 @@
1414
import logging
1515
import multiprocessing.pool
1616
import pathlib
17-
import platform
1817
import glob
1918

2019
from google.cloud import storage
2120

2221
GCS_PARALLELISM = 100
2322

2423

25-
def _get_blob_prefix():
26-
return f"lit_timing_{platform.system().lower()}"
27-
28-
2924
def _maybe_upload_timing_file(bucket, timing_file_path):
3025
if os.path.exists(timing_file_path):
31-
timing_file_blob = bucket.blob(_get_blob_prefix() + "/" + timing_file_path)
26+
timing_file_blob = bucket.blob("lit_timing/" + timing_file_path)
3227
timing_file_blob.upload_from_filename(timing_file_path)
3328

3429

@@ -48,14 +43,14 @@ def upload_timing_files(storage_client, bucket_name: str):
4843

4944

5045
def _maybe_download_timing_file(blob):
51-
file_name = blob.name.removeprefix(_get_blob_prefix() + "/")
46+
file_name = blob.name.removeprefix("lit_timing/")
5247
pathlib.Path(os.path.dirname(file_name)).mkdir(parents=True, exist_ok=True)
5348
blob.download_to_filename(file_name)
5449

5550

5651
def download_timing_files(storage_client, bucket_name: str):
5752
bucket = storage_client.bucket(bucket_name)
58-
blobs = bucket.list_blobs(prefix=_get_blob_prefix())
53+
blobs = bucket.list_blobs(prefix="lit_timing")
5954
with multiprocessing.pool.ThreadPool(GCS_PARALLELISM) as thread_pool:
6055
futures = []
6156
for timing_file_blob in blobs:

.ci/compute_projects.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"libc": {"clang", "lld"},
2727
"openmp": {"clang", "lld"},
2828
"flang": {"llvm", "clang"},
29+
"flang-rt": {"flang"},
2930
"lldb": {"llvm", "clang"},
3031
"libclc": {"llvm", "clang"},
3132
"lld": {"llvm"},
@@ -80,7 +81,9 @@
8081
"clang-tools-extra": {"libc"},
8182
"libc": {"libc"},
8283
"compiler-rt": {"compiler-rt"},
83-
".ci": {"compiler-rt", "libc"},
84+
"flang": {"flang-rt"},
85+
"flang-rt": {"flang-rt"},
86+
".ci": {"compiler-rt", "libc", "flang-rt"},
8487
}
8588
DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG = {
8689
"llvm": {"libcxx", "libcxxabi", "libunwind"},
@@ -95,14 +98,14 @@
9598

9699
EXCLUDE_WINDOWS = {
97100
"cross-project-tests", # TODO(issues/132797): Tests are failing.
98-
"compiler-rt", # TODO(issues/132798): Tests take excessive time.
99101
"openmp", # TODO(issues/132799): Does not detect perl installation.
100102
"libc", # No Windows Support.
101103
"lldb", # TODO(issues/132800): Needs environment setup.
102104
"bolt", # No Windows Support.
103105
"libcxx",
104106
"libcxxabi",
105107
"libunwind",
108+
"flang-rt",
106109
}
107110

108111
# These are projects that we should test if the project itself is changed but
@@ -140,6 +143,7 @@
140143
"bolt": "check-bolt",
141144
"lld": "check-lld",
142145
"flang": "check-flang",
146+
"flang-rt": "check-flang-rt",
143147
"libc": "check-libc",
144148
"lld": "check-lld",
145149
"lldb": "check-lldb",
@@ -148,7 +152,7 @@
148152
"polly": "check-polly",
149153
}
150154

151-
RUNTIMES = {"libcxx", "libcxxabi", "libunwind", "compiler-rt", "libc"}
155+
RUNTIMES = {"libcxx", "libcxxabi", "libunwind", "compiler-rt", "libc", "flang-rt"}
152156

153157
# Meta projects are projects that need explicit handling but do not reside
154158
# in their own top level folder. To add a meta project, the start of the path

.ci/compute_projects_test.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ def test_clang_windows(self):
110110
["clang/CMakeLists.txt"], "Windows"
111111
)
112112
self.assertEqual(
113-
env_variables["projects_to_build"], "clang;clang-tools-extra;llvm"
113+
env_variables["projects_to_build"], "clang;clang-tools-extra;lld;llvm"
114114
)
115115
self.assertEqual(
116116
env_variables["project_check_targets"], "check-clang check-clang-tools"
117117
)
118-
self.assertEqual(env_variables["runtimes_to_build"], "")
118+
self.assertEqual(env_variables["runtimes_to_build"], "compiler-rt")
119119
self.assertEqual(
120120
env_variables["runtimes_check_targets"],
121-
"",
121+
"check-compiler-rt",
122122
)
123123
self.assertEqual(
124124
env_variables["runtimes_check_targets_needs_reconfig"],
@@ -216,8 +216,8 @@ def test_flang(self):
216216
)
217217
self.assertEqual(env_variables["projects_to_build"], "clang;flang;llvm")
218218
self.assertEqual(env_variables["project_check_targets"], "check-flang")
219-
self.assertEqual(env_variables["runtimes_to_build"], "")
220-
self.assertEqual(env_variables["runtimes_check_targets"], "")
219+
self.assertEqual(env_variables["runtimes_to_build"], "flang-rt")
220+
self.assertEqual(env_variables["runtimes_check_targets"], "check-flang-rt")
221221
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
222222
self.assertEqual(env_variables["enable_cir"], "OFF")
223223

@@ -293,11 +293,11 @@ def test_ci(self):
293293
)
294294
self.assertEqual(
295295
env_variables["runtimes_to_build"],
296-
"compiler-rt;libc;libcxx;libcxxabi;libunwind",
296+
"compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind",
297297
)
298298
self.assertEqual(
299299
env_variables["runtimes_check_targets"],
300-
"check-compiler-rt check-libc",
300+
"check-compiler-rt check-flang-rt check-libc",
301301
)
302302
self.assertEqual(
303303
env_variables["runtimes_check_targets_needs_reconfig"],
@@ -318,11 +318,11 @@ def test_windows_ci(self):
318318
)
319319
self.assertEqual(
320320
env_variables["runtimes_to_build"],
321-
"",
321+
"compiler-rt",
322322
)
323323
self.assertEqual(
324324
env_variables["runtimes_check_targets"],
325-
"",
325+
"check-compiler-rt",
326326
)
327327
self.assertEqual(
328328
env_variables["runtimes_check_targets_needs_reconfig"],
@@ -367,11 +367,11 @@ def test_premerge_workflow(self):
367367
)
368368
self.assertEqual(
369369
env_variables["runtimes_to_build"],
370-
"compiler-rt;libc;libcxx;libcxxabi;libunwind",
370+
"compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind",
371371
)
372372
self.assertEqual(
373373
env_variables["runtimes_check_targets"],
374-
"check-compiler-rt check-libc",
374+
"check-compiler-rt check-flang-rt check-libc",
375375
)
376376
self.assertEqual(
377377
env_variables["runtimes_check_targets_needs_reconfig"],
@@ -402,11 +402,11 @@ def test_third_party_benchmark(self):
402402
)
403403
self.assertEqual(
404404
env_variables["runtimes_to_build"],
405-
"compiler-rt;libc;libcxx;libcxxabi;libunwind",
405+
"compiler-rt;flang-rt;libc;libcxx;libcxxabi;libunwind",
406406
)
407407
self.assertEqual(
408408
env_variables["runtimes_check_targets"],
409-
"check-compiler-rt check-libc",
409+
"check-compiler-rt check-flang-rt check-libc",
410410
)
411411
self.assertEqual(
412412
env_variables["runtimes_check_targets_needs_reconfig"],

.ci/monolithic-linux.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
6161
-D LLDB_ENABLE_PYTHON=ON \
6262
-D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
6363
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
64-
-D CMAKE_EXE_LINKER_FLAGS="-no-pie"
64+
-D CMAKE_EXE_LINKER_FLAGS="-no-pie" \
65+
-D LLVM_ENABLE_WERROR=ON
6566

6667
start-group "ninja"
6768

.ci/monolithic-windows.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ source .ci/utils.sh
1717

1818
projects="${1}"
1919
targets="${2}"
20+
runtimes="${3}"
21+
runtimes_targets="${4}"
2022

2123
start-group "CMake"
2224
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
@@ -46,9 +48,16 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4648
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
4749
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
4850
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
49-
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO"
51+
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
52+
-D LLVM_ENABLE_RUNTIMES="${runtimes}"
5053

5154
start-group "ninja"
5255

5356
# Targets are not escaped as they are passed as separate arguments.
5457
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
58+
59+
if [[ "${runtime_targets}" != "" ]]; then
60+
start-group "ninja runtimes"
61+
62+
ninja -C "${BUILD_DIR}" -k 0 ${runtimes_targets} |& tee ninja_runtimes.log
63+
fi

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/runtimes/ @llvm/reviewers-libcxx
1818

1919
/llvm/lib/Analysis/BasicAliasAnalysis.cpp @nikic
20+
/llvm/lib/Analysis/HashRecognize.cpp @artagnon @pfusik
2021
/llvm/lib/Analysis/InstructionSimplify.cpp @nikic
2122
/llvm/lib/Analysis/LazyValueInfo.cpp @nikic
2223
/llvm/lib/Analysis/ScalarEvolution.cpp @nikic

.github/workflows/premerge.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,21 @@ jobs:
108108
109109
echo "Building projects: ${projects_to_build}"
110110
echo "Running project checks targets: ${project_check_targets}"
111+
echo "Building runtimes: ${runtimes_to_build}"
112+
echo "Running runtimes checks targets: ${runtimes_check_targets}"
111113
112114
echo "windows-projects=${projects_to_build}" >> $GITHUB_OUTPUT
113115
echo "windows-check-targets=${project_check_targets}" >> $GITHUB_OUTPUT
116+
echo "windows-runtimes=${runtimes_to_build}" >> $GITHUB_OUTPUT
117+
echo "windows-runtimes-check-targets=${runtimes_check_targets}" >> $GITHUB_OUTPUT
114118
- name: Build and Test
115119
if: ${{ steps.vars.outputs.windows-projects != '' }}
116120
shell: cmd
117121
run: |
118122
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
119123
# See the comments above in the Linux job for why we define each of
120124
# these environment variables.
121-
bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; mkdir artifacts; SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\""
125+
bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; mkdir artifacts; SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server; .ci/monolithic-windows.sh \"${{ steps.vars.outputs.windows-projects }}\" \"${{ steps.vars.outputs.windows-check-targets }}\" \"${{ steps.vars.outputs.windows-runtimes }}\" \"${{ steps.vars.outputs.windows-runtimes-check-targets }}\""
122126
- name: Upload Artifacts
123127
# In some cases, Github will fail to upload the artifact. We want to
124128
# continue anyways as a failed artifact upload is an infra failure, not

bolt/lib/Core/BinaryContext.cpp

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,23 +1568,19 @@ unsigned BinaryContext::addDebugFilenameToUnit(const uint32_t DestCUID,
15681568
DWARFCompileUnit *SrcUnit = DwCtx->getCompileUnitForOffset(SrcCUID);
15691569
const DWARFDebugLine::LineTable *LineTable =
15701570
DwCtx->getLineTableForUnit(SrcUnit);
1571-
const std::vector<DWARFDebugLine::FileNameEntry> &FileNames =
1572-
LineTable->Prologue.FileNames;
1573-
// Dir indexes start at 1, as DWARF file numbers, and a dir index 0
1571+
const DWARFDebugLine::FileNameEntry &FileNameEntry =
1572+
LineTable->Prologue.getFileNameEntry(FileIndex);
1573+
// Dir indexes start at 1 and a dir index 0
15741574
// means empty dir.
1575-
assert(FileIndex > 0 && FileIndex <= FileNames.size() &&
1576-
"FileIndex out of range for the compilation unit.");
15771575
StringRef Dir = "";
1578-
if (FileNames[FileIndex - 1].DirIdx != 0) {
1576+
if (FileNameEntry.DirIdx != 0) {
15791577
if (std::optional<const char *> DirName = dwarf::toString(
1580-
LineTable->Prologue
1581-
.IncludeDirectories[FileNames[FileIndex - 1].DirIdx - 1])) {
1578+
LineTable->Prologue.IncludeDirectories[FileNameEntry.DirIdx - 1])) {
15821579
Dir = *DirName;
15831580
}
15841581
}
15851582
StringRef FileName = "";
1586-
if (std::optional<const char *> FName =
1587-
dwarf::toString(FileNames[FileIndex - 1].Name))
1583+
if (std::optional<const char *> FName = dwarf::toString(FileNameEntry.Name))
15881584
FileName = *FName;
15891585
assert(FileName != "");
15901586
DWARFCompileUnit *DstUnit = DwCtx->getCompileUnitForOffset(DestCUID);
@@ -1925,7 +1921,7 @@ static void printDebugInfo(raw_ostream &OS, const MCInst &Instruction,
19251921
const DWARFDebugLine::Row &Row = LineTable->Rows[RowRef.RowIndex - 1];
19261922
StringRef FileName = "";
19271923
if (std::optional<const char *> FName =
1928-
dwarf::toString(LineTable->Prologue.FileNames[Row.File - 1].Name))
1924+
dwarf::toString(LineTable->Prologue.getFileNameEntry(Row.File).Name))
19291925
FileName = *FName;
19301926
OS << " # debug line " << FileName << ":" << Row.Line;
19311927
if (Row.Column)

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,10 +2517,8 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
25172517
createInstrIncMemory(const MCSymbol *Target, MCContext *Ctx, bool IsLeaf,
25182518
unsigned CodePointerSize) const override {
25192519
unsigned int I = 0;
2520-
InstructionListType Instrs(IsLeaf ? 12 : 10);
2520+
InstructionListType Instrs(10);
25212521

2522-
if (IsLeaf)
2523-
createStackPointerIncrement(Instrs[I++], 128);
25242522
createPushRegisters(Instrs[I++], AArch64::X0, AArch64::X1);
25252523
getSystemFlag(Instrs[I++], AArch64::X1);
25262524
InstructionListType Addr = materializeAddress(Target, Ctx, AArch64::X0);
@@ -2535,8 +2533,6 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
25352533
loadReg(Instrs[I++], AArch64::X2, AArch64::SP);
25362534
setSystemFlag(Instrs[I++], AArch64::X1);
25372535
createPopRegisters(Instrs[I++], AArch64::X0, AArch64::X1);
2538-
if (IsLeaf)
2539-
createStackPointerDecrement(Instrs[I++], 128);
25402536
return Instrs;
25412537
}
25422538

0 commit comments

Comments
 (0)