Skip to content

Commit 760261d

Browse files
committed
Merge remote-tracking branch 'origin/sycl-web' into llvmspirv_pulldown
2 parents 3767874 + fa48dbd commit 760261d

File tree

9,102 files changed

+603941
-184478
lines changed

Some content is hidden

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

9,102 files changed

+603941
-184478
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ echo "Directories modified:" >&2
5353
echo "$modified_dirs" >&2
5454

5555
function compute-projects-to-test() {
56+
isForWindows=$1
57+
shift
5658
projects=${@}
5759
for project in ${projects}; do
5860
echo "${project}"
@@ -63,20 +65,28 @@ function compute-projects-to-test() {
6365
done
6466
;;
6567
llvm)
66-
for p in bolt clang clang-tools-extra flang lld lldb mlir polly; do
68+
for p in bolt clang clang-tools-extra lld lldb mlir polly; do
6769
echo $p
6870
done
71+
# Flang is not stable in Windows CI at the moment
72+
if [[ $isForWindows == 0 ]]; then
73+
echo flang
74+
fi
6975
;;
7076
clang)
71-
for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
77+
# lldb is temporarily removed to alleviate Linux pre-commit CI waiting times
78+
for p in clang-tools-extra compiler-rt cross-project-tests; do
7279
echo $p
7380
done
7481
;;
7582
clang-tools-extra)
7683
echo libc
7784
;;
7885
mlir)
79-
echo flang
86+
# Flang is not stable in Windows CI at the moment
87+
if [[ $isForWindows == 0 ]]; then
88+
echo flang
89+
fi
8090
;;
8191
*)
8292
# Nothing to do
@@ -144,7 +154,6 @@ function exclude-linux() {
144154
for project in ${projects}; do
145155
case ${project} in
146156
cross-project-tests) ;; # tests failing
147-
lldb) ;; # tests failing
148157
openmp) ;; # https://github.com/google/llvm-premerge-checks/issues/410
149158
*)
150159
echo "${project}"
@@ -161,7 +170,7 @@ function exclude-windows() {
161170
compiler-rt) ;; # tests taking too long
162171
openmp) ;; # TODO: having trouble with the Perl installation
163172
libc) ;; # no Windows support
164-
lldb) ;; # tests failing
173+
lldb) ;; # custom environment requirements (https://github.com/llvm/llvm-project/pull/94208#issuecomment-2146256857)
165174
bolt) ;; # tests are not supported yet
166175
*)
167176
echo "${project}"
@@ -204,7 +213,7 @@ function check-targets() {
204213
echo "check-unwind"
205214
;;
206215
lldb)
207-
echo "check-all" # TODO: check-lldb may not include all the LLDB tests?
216+
echo "check-lldb"
208217
;;
209218
pstl)
210219
echo "check-all"
@@ -241,15 +250,15 @@ fi
241250
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
242251
modified_projects="$(keep-modified-projects ${all_projects})"
243252

244-
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_projects}))
253+
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))
245254
linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq)
246255
linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
247256

248257
linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test})
249258
linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
250259
linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
251260

252-
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects}))
261+
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
253262
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq)
254263
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
255264

.ci/monolithic-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ targets="${2}"
3939

4040
echo "--- cmake"
4141
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
42+
pip install -q -r "${MONOREPO_ROOT}"/lldb/test/requirements.txt
4243
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4344
-D LLVM_ENABLE_PROJECTS="${projects}" \
4445
-G Ninja \

.ci/monolithic-windows.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
4444
# see https://github.com/llvm/llvm-project/pull/82393 and
4545
# https://discourse.llvm.org/t/rfc-future-of-windows-pre-commit-ci/76840/40
4646
# for further information.
47+
# We limit the number of parallel compile jobs to 24 control memory
48+
# consumption and improve build reliability.
4749
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4850
-D LLVM_ENABLE_PROJECTS="${projects}" \
4951
-G Ninja \
@@ -58,7 +60,9 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
5860
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
5961
-D CMAKE_EXE_LINKER_FLAGS="/MANIFEST:NO" \
6062
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
61-
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO"
63+
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO" \
64+
-D LLVM_PARALLEL_COMPILE_JOBS=16 \
65+
-D LLVM_PARALLEL_LINK_JOBS=4
6266

6367
echo "--- ninja"
6468
# Targets are not escaped as they are passed as separate arguments.

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,6 @@ f6d557ee34b6bbdb1dc32f29e34b4a4a8ad35e81
8181

8282
# [NFC] clang-format utils/TableGen (#80973)
8383
b9079baaddfed5e604fbfaa1d81a7a1c38e78c26
84+
85+
# [libc++][NFC] Run clang-format on libcxx/include again (#95874)
86+
e2c2ffbe7a1b5d9e32a2ce64279475b50c4cba5b

.github/new-prs-labeler.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ llvm-lit:
5454
- llvm/utils/lit/**/*
5555

5656
PGO:
57+
- llvm/**/ProfileData/**/*
58+
- llvm/**/SampleProfile*
59+
- llvm/**/CodeGen/MIRSampleProfile*
5760
- llvm/lib/Transforms/Instrumentation/CGProfile.cpp
5861
- llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
5962
- llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
@@ -62,9 +65,9 @@ PGO:
6265
- llvm/lib/Transforms/Instrumentation/ValueProfile*
6366
- llvm/test/Instrumentation/InstrProfiling/**/*
6467
- llvm/test/Transforms/PGOProfile/**/*
68+
- llvm/test/Transforms/SampleProfile/**/*
6569
- llvm/**/llvm-profdata/**/*
6670
- llvm/**/llvm-profgen/**/*
67-
- llvm/unittests/ProfileData/**/*
6871

6972
vectorization:
7073
- llvm/lib/Transforms/Vectorize/**/*
@@ -714,6 +717,16 @@ backend:AMDGPU:
714717
- '**/*amdgpu*/**'
715718
- '**/*AMDGPU*/**'
716719

720+
backend:NVPTX:
721+
- 'llvm/**/*nvvm*'
722+
- 'llvm/**/*NVVM*'
723+
- 'llvm/**/*nvptx*'
724+
- 'llvm/**/*NVPTX*'
725+
- 'llvm/**/*nvvm*/**'
726+
- 'llvm/**/*NVVM*/**'
727+
- 'llvm/**/*nvptx*/**'
728+
- 'llvm/**/*NVPTX*/**'
729+
717730
backend:RISC-V:
718731
- clang/**/*riscv*
719732
- clang/**/*RISCV*
@@ -746,6 +759,8 @@ backend:ARM:
746759
- clang/lib/CodeGen/Targets/ARM.cpp
747760
- clang/include/clang/Basic/BuiltinsARM*
748761
- llvm/test/MC/DisasemblerARM/**
762+
- clang/include/clang/Sema/SemaARM.h
763+
- clang/lib/Sema/SemaARM.cpp
749764

750765
backend:AArch64:
751766
- llvm/include/llvm/IR/IntrinsicsAArch64.td
@@ -757,6 +772,8 @@ backend:AArch64:
757772
- clang/lib/CodeGen/Targets/AArch64.cpp
758773
- clang/include/clang/Basic/BuiltinsAArch64*
759774
- llvm/test/MC/Disassembler/AArch64/**
775+
- clang/include/clang/Sema/SemaARM.h
776+
- clang/lib/Sema/SemaARM.cpp
760777

761778
backend:loongarch:
762779
- llvm/include/llvm/IR/IntrinsicsLoongArch.td
@@ -767,6 +784,8 @@ backend:loongarch:
767784
- clang/lib/Driver/ToolChains/Arch/LoongArch.*
768785
- clang/lib/CodeGen/Targets/LoongArch.cpp
769786
- clang/include/clang/Basic/BuiltinsLoongArch*
787+
- clang/include/clang/Sema/SemaLoongArch.h
788+
- clang/lib/Sema/SemaLoongArch.cpp
770789

771790
backend:MSP430:
772791
- llvm/include/llvm/IR/IntrinsicsMSP430.td
@@ -814,6 +833,8 @@ backend:WebAssembly:
814833
- llvm/unittests/Target/WebAssembly/**
815834
- llvm/test/DebugInfo/WebAssembly/**
816835
- llvm/test/MC/WebAssembly/**
836+
- clang/include/clang/Sema/SemaWasm.h
837+
- clang/lib/Sema/SemaLoongWasm.cpp
817838

818839
backend:X86:
819840
- llvm/include/llvm/IR/IntrinsicsX86.td
@@ -833,6 +854,8 @@ backend:X86:
833854
- llvm/include/llvm/TargetParser/X86*
834855
- llvm/lib/TargetParser/X86*
835856
- llvm/utils/TableGen/X86*
857+
- clang/include/clang/Sema/SemaX86.h
858+
- clang/lib/Sema/SemaX86.cpp
836859

837860
backend:PowerPC:
838861
- llvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC*
@@ -857,6 +880,8 @@ backend:PowerPC:
857880
- clang/lib/Driver/ToolChains/AIX*
858881
- clang/lib/Driver/ToolChains/Arch/PPC.*
859882
- clang/test/CodeGen/PowerPC/**
883+
- clang/include/clang/Sema/SemaPPC.h
884+
- clang/lib/Sema/SemaPPC.cpp
860885

861886
backend:SystemZ:
862887
- llvm/include/llvm/BinaryFormat/ELFRelocs/SystemZ*
@@ -877,6 +902,8 @@ backend:SystemZ:
877902
- clang/lib/Driver/ToolChains/ZOS*
878903
- clang/lib/Driver/ToolChains/Arch/SystemZ.*
879904
- clang/test/CodeGen/SystemZ/**
905+
- clang/include/clang/Sema/SemaSystemZ.h
906+
- clang/lib/Sema/SemaSystemZ.cpp
880907

881908
third-party:unittests:
882909
- third-party/unittests/**
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import json
2+
import multiprocessing
3+
import os
4+
import re
5+
import subprocess
6+
import sys
7+
8+
9+
def run_analyzer(data):
10+
os.chdir(data["directory"])
11+
command = (
12+
data["command"]
13+
+ f" --analyze --analyzer-output html -o analyzer-results -Xclang -analyzer-config -Xclang max-nodes=75000"
14+
)
15+
print(command)
16+
subprocess.run(command, shell=True, check=True)
17+
18+
19+
def pool_error(e):
20+
print("Error analyzing file:", e)
21+
22+
23+
def main():
24+
db_path = sys.argv[1]
25+
database = json.load(open(db_path))
26+
27+
with multiprocessing.Pool() as pool:
28+
pool.map_async(run_analyzer, [k for k in database], error_callback=pool_error)
29+
pool.close()
30+
pool.join()
31+
32+
33+
if __name__ == "__main__":
34+
main()
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Post-Commit Static Analyzer
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- 'release/**'
10+
paths:
11+
- 'clang/**'
12+
- 'llvm/**'
13+
- '.github/workflows/ci-post-commit-analyzer.yml'
14+
pull_request:
15+
types:
16+
- opened
17+
- synchronize
18+
- reopened
19+
- closed
20+
paths:
21+
- '.github/workflows/ci-post-commit-analyzer.yml'
22+
- '.github/workflows/ci-post-commit-analyzer-run.py'
23+
schedule:
24+
- cron: '30 0 * * *'
25+
26+
concurrency:
27+
group: >-
28+
llvm-project-${{ github.workflow }}-${{ github.event_name == 'pull_request' &&
29+
( github.event.pull_request.number || github.ref) }}
30+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
31+
32+
jobs:
33+
post-commit-analyzer:
34+
if: >-
35+
github.repository_owner == 'llvm' &&
36+
github.event.action != 'closed'
37+
runs-on: ubuntu-22.04
38+
container:
39+
image: 'ghcr.io/llvm/ci-ubuntu-22.04:latest'
40+
env:
41+
LLVM_VERSION: 18
42+
steps:
43+
- name: Checkout Source
44+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
45+
46+
- name: Setup ccache
47+
uses: hendrikmuhs/ccache-action@v1
48+
with:
49+
# A full build of llvm, clang, lld, and lldb takes about 250MB
50+
# of ccache space. There's not much reason to have more than this,
51+
# because we usually won't need to save cache entries from older
52+
# builds. Also, there is an overall 10GB cache limit, and each
53+
# run creates a new cache entry so we want to ensure that we have
54+
# enough cache space for all the tests to run at once and still
55+
# fit under the 10 GB limit.
56+
# Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
57+
max-size: 2G
58+
key: post-commit-analyzer
59+
variant: sccache
60+
61+
- name: Configure
62+
run: |
63+
cmake -B build -S llvm -G Ninja \
64+
-DLLVM_ENABLE_ASSERTIONS=ON \
65+
-DLLVM_ENABLE_PROJECTS=clang \
66+
-DLLVM_BUILD_LLVM_DYLIB=ON \
67+
-DLLVM_LINK_LLVM_DYLIB=ON \
68+
-DCMAKE_CXX_COMPILER=clang++ \
69+
-DCMAKE_C_COMPILER=clang \
70+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
71+
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
72+
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
73+
-DLLVM_INCLUDE_TESTS=OFF \
74+
-DCLANG_INCLUDE_TESTS=OFF \
75+
-DCMAKE_BUILD_TYPE=Release
76+
77+
- name: Build
78+
run: |
79+
# FIXME: We need to build all the generated header files in order to be able to run
80+
# the analyzer on every file. Building libLLVM and libclang is probably overkill for
81+
# this, but it's better than building every target.
82+
ninja -v -C build libLLVM.so libclang.so
83+
84+
# Run the analyzer.
85+
python3 .github/workflows/ci-post-commit-analyzer-run.py build/compile_commands.json
86+
87+
scan-build --generate-index-only build/analyzer-results
88+
89+
- name: Upload Results
90+
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
91+
if: always()
92+
with:
93+
name: analyzer-results
94+
path: 'build/analyzer-results/*'
95+

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ RUN cmake -B ./build -G Ninja ./llvm \
3737
-DLLVM_ENABLE_RUNTIMES="compiler-rt" \
3838
-DCMAKE_INSTALL_PREFIX="$LLVM_SYSROOT" \
3939
-DLLVM_ENABLE_PROJECTS="bolt;clang;lld;clang-tools-extra" \
40-
-DLLVM_DISTRIBUTION_COMPONENTS="lld;compiler-rt;clang-format" \
40+
-DLLVM_DISTRIBUTION_COMPONENTS="lld;compiler-rt;clang-format;scan-build" \
4141
-DCLANG_DEFAULT_LINKER="lld" \
4242
-DBOOTSTRAP_CLANG_PGO_TRAINING_DATA_SOURCE_DIR=/llvm-project-llvmorg-$LLVM_VERSION/llvm
4343

.github/workflows/libclang-python-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
python-version: ["3.7", "3.11"]
39+
python-version: ["3.8", "3.11"]
4040
uses: ./.github/workflows/llvm-project-tests.yml
4141
with:
4242
build_target: check-clang-python

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,16 @@ jobs:
209209
- uses: actions/checkout@v4
210210
- name: Install dependencies
211211
run: |
212-
choco install -y ninja wget
212+
choco install -y ninja
213213
pip install psutil
214214
- name: Install a current LLVM
215215
if: ${{ matrix.mingw != true }}
216216
run: |
217-
choco install -y llvm --version=17.0.6
217+
choco install -y llvm --version=18.1.6 --allow-downgrade
218218
- name: Install llvm-mingw
219219
if: ${{ matrix.mingw == true }}
220220
run: |
221-
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-x86_64.zip
221+
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20240606/llvm-mingw-20240606-ucrt-x86_64.zip
222222
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
223223
del llvm-mingw*.zip
224224
mv llvm-mingw* c:\llvm-mingw

0 commit comments

Comments
 (0)