Skip to content

Commit d13339b

Browse files
author
Tom James
committed
Merge branch 'bugprone-method-hiding' of github.com:t-a-james/llvm-project into bugprone-method-hiding
* 'bugprone-method-hiding' of github.com:t-a-james/llvm-project: (230 commits) [SimplifyCFG] Move token type check into canReplaceOperandWithVariable() [ADT] Fix signed integer overflow (llvm#155826) [Offload] Update LIBOMPTARGET_INFO text for `attach` map-type. (llvm#155509) [CMake][AIX] Enable CMP0182: Create shared library archives by default (llvm#155686) AMDGPU: Add tests for atomics with AGPR operands (llvm#155820) [AArch64] Split zero cycle zeoring per register class (llvm#154561) [gn build] Port fa883e1 [mlir][tosa] Allow shift operand of tosa::MulOp as non-constant (llvm#155197) [AArch64][NFC] Add MCInstrAnalysis unittests (llvm#155609) [Offload][OpenMP] Tests require libc on GPU for printf (llvm#155785) AMDGPU: Add missing verifier tests for load/store AGPR case (llvm#155815) [lldb-mcp] Fix building for Windows Revert "[lldb] Correct a usage after a rename was merged. (llvm#155720)" Revert "[lldb] NFC Moving mcp::Transport into its own file. (llvm#155711)" [lldb][test] Run ranges::ref_vew test only for libc++ (llvm#155813) [SCCP][FuncSpec] Poison unreachable constant global variable user (llvm#155753) [LoongArch] Lowering v32i8 vector mask generation to `VMSKLTZ` (llvm#149953) [flang][docs][NFC] Remove stray backtick (llvm#154974) [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in LinalgOps.cpp (NFC) [MLIR] Apply clang-tidy fixes for performance-move-const-arg in VariantValue.cpp (NFC) ...
2 parents 899cd2c + a934b43 commit d13339b

File tree

881 files changed

+187666
-19823
lines changed

Some content is hidden

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

881 files changed

+187666
-19823
lines changed

.ci/all_requirements.txt

Lines changed: 213 additions & 11 deletions
Large diffs are not rendered by default.

.ci/cache_lit_timing_files.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2+
# See https://llvm.org/LICENSE.txt for license information.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
"""Caches .lit_test_times.txt files between premerge invocations.
5+
6+
.lit_test_times.txt files are used by lit to order tests to best take advantage
7+
of parallelism. Having them around and up to date can result in a ~15%
8+
improvement in test times. This script downloading cached test time files and
9+
uploading new versions to the GCS buckets used for caching.
10+
"""
11+
12+
import sys
13+
import os
14+
import logging
15+
import multiprocessing.pool
16+
import pathlib
17+
import glob
18+
19+
from google.cloud import storage
20+
21+
GCS_PARALLELISM = 100
22+
23+
24+
def _maybe_upload_timing_file(bucket, timing_file_path):
25+
if os.path.exists(timing_file_path):
26+
timing_file_blob = bucket.blob("lit_timing/" + timing_file_path)
27+
timing_file_blob.upload_from_filename(timing_file_path)
28+
29+
30+
def upload_timing_files(storage_client, bucket_name: str):
31+
bucket = storage_client.bucket(bucket_name)
32+
with multiprocessing.pool.ThreadPool(GCS_PARALLELISM) as thread_pool:
33+
futures = []
34+
for timing_file_path in glob.glob("**/.lit_test_times.txt", recursive=True):
35+
futures.append(
36+
thread_pool.apply_async(
37+
_maybe_upload_timing_file, (bucket, timing_file_path)
38+
)
39+
)
40+
for future in futures:
41+
future.get()
42+
print("Done uploading")
43+
44+
45+
def _maybe_download_timing_file(blob):
46+
file_name = blob.name.removeprefix("lit_timing/")
47+
pathlib.Path(os.path.dirname(file_name)).mkdir(parents=True, exist_ok=True)
48+
blob.download_to_filename(file_name)
49+
50+
51+
def download_timing_files(storage_client, bucket_name: str):
52+
bucket = storage_client.bucket(bucket_name)
53+
blobs = bucket.list_blobs(prefix="lit_timing")
54+
with multiprocessing.pool.ThreadPool(GCS_PARALLELISM) as thread_pool:
55+
futures = []
56+
for timing_file_blob in blobs:
57+
futures.append(
58+
thread_pool.apply_async(
59+
_maybe_download_timing_file, (timing_file_blob,)
60+
)
61+
)
62+
for future in futures:
63+
future.get()
64+
print("Done downloading")
65+
66+
67+
if __name__ == "__main__":
68+
if len(sys.argv) != 2:
69+
logging.fatal("Expected usage is cache_lit_timing_files.py <upload/download>")
70+
sys.exit(1)
71+
action = sys.argv[1]
72+
storage_client = storage.Client()
73+
bucket_name = os.environ["CACHE_GCS_BUCKET"]
74+
if action == "download":
75+
download_timing_files(storage_client, bucket_name)
76+
elif action == "upload":
77+
upload_timing_files(storage_client, bucket_name)
78+
else:
79+
logging.fatal("Expected usage is cache_lit_timing_files.py <upload/download>")
80+
sys.exit(1)

.ci/metrics/metrics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
# by trial and error).
7171
GRAFANA_METRIC_MAX_AGE_MN = 120
7272

73+
7374
@dataclass
7475
class JobMetrics:
7576
job_name: str
@@ -243,6 +244,7 @@ def clean_up_libcxx_job_name(old_name: str) -> str:
243244
new_name = stage + "_" + remainder
244245
return new_name
245246

247+
246248
def github_get_metrics(
247249
github_repo: github.Repository, last_workflows_seen_as_completed: set[int]
248250
) -> tuple[list[JobMetrics], int]:

.ci/metrics/metrics_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,5 +409,6 @@ def test_clean_up_libcxx_job_name(self):
409409
out_name4 = metrics.clean_up_libcxx_job_name(bad_name)
410410
self.assertEqual(out_name4, bad_name)
411411

412+
412413
if __name__ == "__main__":
413414
unittest.main()

.ci/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
junitparser==3.2.0
2+
google-cloud-storage==3.3.0

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/library/ubuntu:24.04 as base
22
ENV LLVM_SYSROOT=/opt/llvm
33

44
FROM base as stage1-toolchain
5-
ENV LLVM_VERSION=20.1.8
5+
ENV LLVM_VERSION=21.1.0
66

77
RUN apt-get update && \
88
apt-get install -y \

bolt/test/AArch64/veneer-lld-abs.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
## Occasionally, we see the linker not generating $d symbols for long veneers
1414
## causing BOLT to fail veneer elimination.
15-
# RUN: llvm-objcopy --remove-symbol-prefix=\$d %t.exe %t.no-marker.exe
15+
# RUN: llvm-objcopy --remove-symbol-prefix='$d' %t.exe %t.no-marker.exe
1616
# RUN: llvm-bolt %t.no-marker.exe -o %t.no-marker.bolt \
1717
# RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-BOLT
1818
# RUN: llvm-objdump -d -j .text %t.no-marker.bolt | \

bolt/test/X86/double-jump.test

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
## Test the double jump removal peephole.
22

3-
## This test has commands that rely on shell capabilities that won't execute
4-
## correctly on Windows e.g. subshell execution
5-
REQUIRES: shell
6-
73
RUN: %clangxx %cxxflags %p/Inputs/double_jump.cpp -o %t.exe
8-
RUN: (llvm-bolt %t.exe --peepholes=double-jumps \
9-
RUN: --eliminate-unreachable -o %t 2>&1 \
10-
RUN: && llvm-objdump -d %t --print-imm-hex --no-show-raw-insn) | FileCheck %s
4+
RUN: llvm-bolt %t.exe --peepholes=double-jumps \
5+
RUN: --eliminate-unreachable -o %t | FileCheck --check-prefix CHECK-BOLT %s
6+
RUN: llvm-objdump -d %t --print-imm-hex --no-show-raw-insn | FileCheck %s
117

12-
CHECK: BOLT-INFO: Peephole: 1 double jumps patched.
8+
CHECK-BOLT: BOLT-INFO: Peephole: 1 double jumps patched.
139

1410
CHECK: <_Z3foom>:
1511
CHECK-NEXT: pushq %rbp

bolt/test/X86/jmp-optimization.test

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
## Tests the optimization of functions that just do a tail call in the beginning.
22

3-
## This test has commands that rely on shell capabilities that won't execute
4-
## correctly on Windows e.g. unsupported parameter expansion
5-
REQUIRES: shell
6-
7-
RUN: %clangxx %cxxflags -O2 %S/Inputs/jmp_opt{,2,3}.cpp -o %t
3+
RUN: %clangxx %cxxflags -O2 %S/Inputs/jmp_opt.cpp %S/Inputs/jmp_opt2.cpp \
4+
RUN: %S/Inputs/jmp_opt3.cpp -o %t
85
RUN: llvm-bolt -inline-small-functions %t -o %t.bolt
96
RUN: llvm-objdump -d %t.bolt --print-imm-hex | FileCheck %s
107

bolt/test/X86/jump-table-icp.test

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,16 @@ RUN: link_fdata %p/Inputs/jump_table_icp.s %t.o %t.fdata --nmtool llvm-nm
44
RUN: llvm-strip --strip-unneeded %t.o
55
RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q
66

7-
## This test has commands that rely on shell capabilities that won't execute
8-
## correctly on Windows e.g. subshell execution
9-
REQUIRES: shell
10-
11-
RUN: (llvm-bolt %t.exe --data %t.fdata -o %t --relocs \
7+
RUN: llvm-bolt %t.exe --data %t.fdata -o %t --relocs \
128
RUN: --reorder-blocks=cache --split-functions --split-all-cold \
139
RUN: --use-gnu-stack --dyno-stats --indirect-call-promotion=jump-tables \
1410
RUN: --print-icp -v=0 \
1511
RUN: --enable-bat --print-cache-metrics \
1612
RUN: --icp-jt-remaining-percent-threshold=10 \
1713
RUN: --icp-jt-total-percent-threshold=2 \
1814
RUN: --indirect-call-promotion-topn=1 \
19-
RUN: --icp-jump-tables-targets --align-functions-max-bytes=7 2>&1 && \
20-
RUN: llvm-objdump -d %t --print-imm-hex) | FileCheck %s
15+
RUN: --icp-jump-tables-targets --align-functions-max-bytes=7 | FileCheck %s
16+
RUN: llvm-objdump -d %t --print-imm-hex | FileCheck --check-prefix CHECK-ASM %s
2117

2218
BOLT-INFO: ICP total indirect callsites = 0
2319
BOLT-INFO: ICP total jump table callsites = 2
@@ -107,14 +103,14 @@ CHECK-NEXT: Exec Count : 140
107103
CHECK: Predecessors: .Ltmp{{.*}}, .LFT{{.*}}
108104
CHECK: Successors: .Ltmp{{.*}} (mispreds: 0, count: 98)
109105

110-
CHECK: <_Z3inci>:
111-
CHECK: movq 0x{{.*}}(,%rax,8), %rax
112-
CHECK-NEXT: cmpq $0x{{.*}}, %rax
113-
CHECK-NEXT: je {{.*}} <_Z3inci+0x{{.*}}>
114-
CHECK-NEXT: jmpq *%rax
115-
116-
CHECK: <_Z7inc_dupi>:
117-
CHECK: movq 0x{{.*}}(,%rax,8), %rax
118-
CHECK-NEXT: cmpq $0x{{.*}}, %rax
119-
CHECK-NEXT: je {{.*}} <_Z7inc_dupi+0x{{.*}}>
120-
CHECK-NEXT: jmpq *%rax
106+
CHECK-ASM: <_Z3inci>:
107+
CHECK-ASM: movq 0x{{.*}}(,%rax,8), %rax
108+
CHECK-ASM-NEXT: cmpq $0x{{.*}}, %rax
109+
CHECK-ASM-NEXT: je {{.*}} <_Z3inci+0x{{.*}}>
110+
CHECK-ASM-NEXT: jmpq *%rax
111+
112+
CHECK-ASM: <_Z7inc_dupi>:
113+
CHECK-ASM: movq 0x{{.*}}(,%rax,8), %rax
114+
CHECK-ASM-NEXT: cmpq $0x{{.*}}, %rax
115+
CHECK-ASM-NEXT: je {{.*}} <_Z7inc_dupi+0x{{.*}}>
116+
CHECK-ASM-NEXT: jmpq *%rax

0 commit comments

Comments
 (0)