Skip to content

Commit fe03d51

Browse files
committed
Merge remote-tracking branch 'origin/main' into vplan-middle-block-branch
2 parents 4dfba5d + f38d84c commit fe03d51

File tree

3,215 files changed

+133077
-31403
lines changed

Some content is hidden

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

3,215 files changed

+133077
-31403
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 43 additions & 16 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,9 +65,13 @@ 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)
7177
for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
@@ -76,7 +82,26 @@ function compute-projects-to-test() {
7682
echo libc
7783
;;
7884
mlir)
79-
echo flang
85+
# Flang is not stable in Windows CI at the moment
86+
if [[ $isForWindows == 0 ]]; then
87+
echo flang
88+
fi
89+
;;
90+
*)
91+
# Nothing to do
92+
;;
93+
esac
94+
done
95+
}
96+
97+
function compute-runtimes-to-test() {
98+
projects=${@}
99+
for project in ${projects}; do
100+
case ${project} in
101+
clang)
102+
for p in libcxx libcxxabi libunwind; do
103+
echo $p
104+
done
80105
;;
81106
*)
82107
# Nothing to do
@@ -178,6 +203,15 @@ function check-targets() {
178203
cross-project-tests)
179204
echo "check-cross-project"
180205
;;
206+
libcxx)
207+
echo "check-cxx"
208+
;;
209+
libcxxabi)
210+
echo "check-cxxabi"
211+
;;
212+
libunwind)
213+
echo "check-unwind"
214+
;;
181215
lldb)
182216
echo "check-all" # TODO: check-lldb may not include all the LLDB tests?
183217
;;
@@ -207,17 +241,6 @@ if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cma
207241
EOF
208242
fi
209243

210-
# If clang changed.
211-
if echo "$modified_dirs" | grep -q -E "^(clang)$"; then
212-
cat <<EOF
213-
- trigger: "clang-ci"
214-
build:
215-
message: "${buildMessage}"
216-
commit: "${BUILDKITE_COMMIT}"
217-
branch: "${BUILDKITE_BRANCH}"
218-
EOF
219-
fi
220-
221244
# Generic pipeline for projects that have not defined custom steps.
222245
#
223246
# Individual projects should instead define the pre-commit CI tests that suits their
@@ -227,11 +250,15 @@ fi
227250
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
228251
modified_projects="$(keep-modified-projects ${all_projects})"
229252

230-
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}))
231254
linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq)
232255
linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
233256

234-
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects}))
257+
linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test})
258+
linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
259+
linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
260+
261+
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
235262
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq)
236263
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
237264

@@ -255,7 +282,7 @@ if [[ "${linux_projects}" != "" ]]; then
255282
CC: 'clang'
256283
CXX: 'clang++'
257284
commands:
258-
- './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"'
285+
- './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"'
259286
EOF
260287
fi
261288

.ci/monolithic-linux.sh

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ set -o pipefail
1818

1919
MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
2020
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
21+
INSTALL_DIR="${BUILD_DIR}/install"
2122
rm -rf "${BUILD_DIR}"
2223

2324
ccache --zero-stats
@@ -49,8 +50,79 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4950
-D LLVM_ENABLE_LLD=ON \
5051
-D CMAKE_CXX_FLAGS=-gmlt \
5152
-D LLVM_CCACHE_BUILD=ON \
52-
-D MLIR_ENABLE_BINDINGS_PYTHON=ON
53+
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
54+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
5355

5456
echo "--- ninja"
5557
# Targets are not escaped as they are passed as separate arguments.
5658
ninja -C "${BUILD_DIR}" -k 0 ${targets}
59+
60+
runtimes="${3}"
61+
runtime_targets="${4}"
62+
63+
# Compiling runtimes with just-built Clang and running their tests
64+
# as an additional testing for Clang.
65+
if [[ "${runtimes}" != "" ]]; then
66+
if [[ "${runtime_targets}" == "" ]]; then
67+
echo "Runtimes to build are specified, but targets are not."
68+
exit 1
69+
fi
70+
71+
echo "--- ninja install-clang"
72+
73+
ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers
74+
75+
RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes"
76+
INSTALL_DIR="${BUILD_DIR}/install"
77+
mkdir -p ${RUNTIMES_BUILD_DIR}
78+
79+
echo "--- cmake runtimes C++03"
80+
81+
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
82+
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
83+
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
84+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
85+
-D LIBCXX_CXX_ABI=libcxxabi \
86+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
87+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
88+
-D LIBCXX_TEST_PARAMS="std=c++03" \
89+
-D LIBCXXABI_TEST_PARAMS="std=c++03"
90+
91+
echo "--- ninja runtimes C++03"
92+
93+
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
94+
95+
echo "--- cmake runtimes C++26"
96+
97+
rm -rf "${RUNTIMES_BUILD_DIR}"
98+
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
99+
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
100+
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
101+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
102+
-D LIBCXX_CXX_ABI=libcxxabi \
103+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
104+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
105+
-D LIBCXX_TEST_PARAMS="std=c++26" \
106+
-D LIBCXXABI_TEST_PARAMS="std=c++26"
107+
108+
echo "--- ninja runtimes C++26"
109+
110+
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
111+
112+
echo "--- cmake runtimes clang modules"
113+
114+
rm -rf "${RUNTIMES_BUILD_DIR}"
115+
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
116+
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
117+
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
118+
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
119+
-D LIBCXX_CXX_ABI=libcxxabi \
120+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
121+
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
122+
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
123+
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang"
124+
125+
echo "--- ninja runtimes clang modules"
126+
127+
ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
128+
fi

.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.

.github/new-prs-labeler.yml

Lines changed: 18 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/**/*
@@ -746,6 +749,8 @@ backend:ARM:
746749
- clang/lib/CodeGen/Targets/ARM.cpp
747750
- clang/include/clang/Basic/BuiltinsARM*
748751
- llvm/test/MC/DisasemblerARM/**
752+
- clang/include/clang/Sema/SemaARM.h
753+
- clang/lib/Sema/SemaARM.cpp
749754

750755
backend:AArch64:
751756
- llvm/include/llvm/IR/IntrinsicsAArch64.td
@@ -757,6 +762,8 @@ backend:AArch64:
757762
- clang/lib/CodeGen/Targets/AArch64.cpp
758763
- clang/include/clang/Basic/BuiltinsAArch64*
759764
- llvm/test/MC/Disassembler/AArch64/**
765+
- clang/include/clang/Sema/SemaARM.h
766+
- clang/lib/Sema/SemaARM.cpp
760767

761768
backend:loongarch:
762769
- llvm/include/llvm/IR/IntrinsicsLoongArch.td
@@ -767,6 +774,8 @@ backend:loongarch:
767774
- clang/lib/Driver/ToolChains/Arch/LoongArch.*
768775
- clang/lib/CodeGen/Targets/LoongArch.cpp
769776
- clang/include/clang/Basic/BuiltinsLoongArch*
777+
- clang/include/clang/Sema/SemaLoongArch.h
778+
- clang/lib/Sema/SemaLoongArch.cpp
770779

771780
backend:MSP430:
772781
- llvm/include/llvm/IR/IntrinsicsMSP430.td
@@ -814,6 +823,8 @@ backend:WebAssembly:
814823
- llvm/unittests/Target/WebAssembly/**
815824
- llvm/test/DebugInfo/WebAssembly/**
816825
- llvm/test/MC/WebAssembly/**
826+
- clang/include/clang/Sema/SemaWasm.h
827+
- clang/lib/Sema/SemaLoongWasm.cpp
817828

818829
backend:X86:
819830
- llvm/include/llvm/IR/IntrinsicsX86.td
@@ -833,6 +844,8 @@ backend:X86:
833844
- llvm/include/llvm/TargetParser/X86*
834845
- llvm/lib/TargetParser/X86*
835846
- llvm/utils/TableGen/X86*
847+
- clang/include/clang/Sema/SemaX86.h
848+
- clang/lib/Sema/SemaX86.cpp
836849

837850
backend:PowerPC:
838851
- llvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC*
@@ -857,6 +870,8 @@ backend:PowerPC:
857870
- clang/lib/Driver/ToolChains/AIX*
858871
- clang/lib/Driver/ToolChains/Arch/PPC.*
859872
- clang/test/CodeGen/PowerPC/**
873+
- clang/include/clang/Sema/SemaPPC.h
874+
- clang/lib/Sema/SemaPPC.cpp
860875

861876
backend:SystemZ:
862877
- llvm/include/llvm/BinaryFormat/ELFRelocs/SystemZ*
@@ -877,6 +892,8 @@ backend:SystemZ:
877892
- clang/lib/Driver/ToolChains/ZOS*
878893
- clang/lib/Driver/ToolChains/Arch/SystemZ.*
879894
- clang/test/CodeGen/SystemZ/**
895+
- clang/include/clang/Sema/SemaSystemZ.h
896+
- clang/lib/Sema/SemaSystemZ.cpp
880897

881898
third-party:unittests:
882899
- third-party/unittests/**

0 commit comments

Comments
 (0)