Skip to content

Commit 6757986

Browse files
committed
Merge branch 'main' into refactoring/using-enums-yaml
2 parents 44bfe7a + d88c89f commit 6757986

File tree

5,961 files changed

+479741
-166818
lines changed

Some content is hidden

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

5,961 files changed

+479741
-166818
lines changed

.ci/compute_projects.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898

9999
EXCLUDE_WINDOWS = {
100100
"cross-project-tests", # TODO(issues/132797): Tests are failing.
101-
"compiler-rt", # TODO(issues/132798): Tests take excessive time.
102101
"openmp", # TODO(issues/132799): Does not detect perl installation.
103102
"libc", # No Windows Support.
104103
"lldb", # TODO(issues/132800): Needs environment setup.

.ci/compute_projects_test.py

Lines changed: 5 additions & 5 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"],
@@ -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"],

.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/new-prs-labeler.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,14 @@ clang:openmp:
10901090
- llvm/unittests/Frontend/OpenMP*
10911091
- llvm/test/Transforms/OpenMP/**
10921092

1093+
clang:temporal-safety:
1094+
- clang/include/clang/Analysis/Analyses/LifetimeSafety*
1095+
- clang/lib/Analysis/LifetimeSafety*
1096+
- clang/unittests/Analysis/LifetimeSafety*
1097+
- clang/test/Sema/*lifetime-safety*
1098+
- clang/test/Sema/*lifetime-analysis*
1099+
- clang/test/Analysis/LifetimeSafety/**
1100+
10931101
clang:as-a-library:
10941102
- clang/tools/libclang/**
10951103
- clang/bindings/**
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This file defines a workflow that runs the libc++ benchmarks when a comment is added to the PR.
2+
#
3+
# The comment is of the form:
4+
#
5+
# /libcxx-bot benchmark <path-to-benchmarks-to-run>
6+
#
7+
# That will cause the specified benchmarks to be run on the PR and on the pull-request target, and
8+
# their results to be compared.
9+
10+
name: Benchmark libc++
11+
12+
permissions:
13+
contents: read # Default everything to read-only
14+
15+
on:
16+
issue_comment:
17+
types:
18+
- created
19+
- edited
20+
21+
env:
22+
CC: clang-22
23+
CXX: clang++-22
24+
25+
jobs:
26+
run-benchmarks:
27+
if: >-
28+
github.event.issue.pull_request &&
29+
contains(github.event.comment.body, '/libcxx-bot benchmark')
30+
31+
runs-on: llvm-premerge-libcxx-next-runners # TODO: This should run on a dedicated set of machines
32+
steps:
33+
- uses: actions/setup-python@v6
34+
with:
35+
python-version: '3.10'
36+
37+
- name: Extract information from the PR
38+
id: vars
39+
run: |
40+
python3 -m venv .venv
41+
source .venv/bin/activate
42+
python -m pip install pygithub
43+
cat <<EOF | python >> ${GITHUB_OUTPUT}
44+
import github
45+
repo = github.Github("${{ github.token }}").get_repo("${{ github.repository }}")
46+
pr = repo.get_pull(${{ github.event.issue.number }})
47+
print(f"pr_base={pr.base.sha}")
48+
print(f"pr_head={pr.head.sha}")
49+
EOF
50+
BENCHMARKS=$(echo "${{ github.event.comment.body }}" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
51+
echo "benchmarks=${BENCHMARKS}" >> ${GITHUB_OUTPUT}
52+
53+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
54+
with:
55+
ref: ${{ steps.vars.outputs.pr_head }}
56+
fetch-depth: 0
57+
fetch-tags: true # This job requires access to all the Git branches so it can diff against (usually) main
58+
path: repo # Avoid nuking the workspace, where we have the Python virtualenv
59+
60+
- name: Run baseline
61+
run: |
62+
source .venv/bin/activate
63+
python -m pip install -r repo/libcxx/utils/requirements.txt
64+
baseline_commit=$(git -C repo merge-base ${{ steps.vars.outputs.pr_base }} ${{ steps.vars.outputs.pr_head }})
65+
./repo/libcxx/utils/test-at-commit --git-repo repo --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
66+
67+
- name: Run candidate
68+
run: |
69+
source .venv/bin/activate
70+
./repo/libcxx/utils/test-at-commit --git-repo repo --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
71+
72+
- name: Compare baseline and candidate runs
73+
run: |
74+
source .venv/bin/activate
75+
./repo/libcxx/utils/compare-benchmarks <(./repo/libcxx/utils/consolidate-benchmarks build/baseline) \
76+
<(./repo/libcxx/utils/consolidate-benchmarks build/candidate)

.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/docs/CommandLineArgumentReference.md

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

638638
- `--inline-memcpy`
639639

640-
Inline memcpy using 'rep movsb' instruction (X86-only)
640+
Inline memcpy using optimized instruction sequences (X86: 'rep movsb', AArch64: width-optimized register operations)
641641

642642
- `--inline-small-functions`
643643

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,12 @@ class BinaryContext {
288288
/// overwritten, but it is okay to re-generate debug info for them.
289289
std::set<const DWARFUnit *> ProcessedCUs;
290290

291+
/// DWARF-related container to manage lifecycle of groups of rows from line
292+
/// tables associated with instructions. Since binary functions can span
293+
/// multiple compilation units, instructions may reference debug line
294+
/// information from multiple CUs.
295+
ClusteredRowsContainer ClusteredRows;
296+
291297
// Setup MCPlus target builder
292298
void initializeTarget(std::unique_ptr<MCPlusBuilder> TargetBuilder) {
293299
MIB = std::move(TargetBuilder);

0 commit comments

Comments
 (0)