Skip to content

Commit 94391df

Browse files
committed
Merge remote-tracking branch 'origin/amd-staging' into users/jam/sethalt-hotswap-gfx1250-staging
2 parents 944d977 + 9b25fca commit 94391df

7,524 files changed

Lines changed: 511808 additions & 277662 deletions

File tree

Some content is hidden

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

.ci/compute_projects.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
# but not necessarily run for testing. The only case of this currently is lldb
7676
# which needs some runtimes enabled for tests.
7777
DEPENDENT_RUNTIMES_TO_BUILD = {
78+
"flang": {"openmp"},
7879
"lldb": {"libcxx", "libcxxabi", "libunwind", "compiler-rt"}
7980
}
8081

.ci/compute_projects_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ def test_flang(self):
219219
env_variables = compute_projects.get_env_variables(
220220
["flang/CMakeLists.txt"], "Linux"
221221
)
222-
self.assertEqual(env_variables["projects_to_build"], "clang;flang;llvm")
222+
self.assertEqual(env_variables["projects_to_build"], "clang;flang;lld;llvm")
223223
self.assertEqual(env_variables["project_check_targets"], "check-flang")
224-
self.assertEqual(env_variables["runtimes_to_build"], "flang-rt")
224+
self.assertEqual(env_variables["runtimes_to_build"], "flang-rt;openmp")
225225
self.assertEqual(env_variables["runtimes_check_targets"], "check-flang-rt")
226226
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
227227
self.assertEqual(env_variables["enable_cir"], "OFF")

.ci/green-dragon/lldb-windows.groovy

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ pipeline {
2020
stages {
2121
stage('Pull Docker Image') {
2222
steps {
23-
bat 'docker pull swiftlang/swift-ci:lldb-windowsservercore-1809'
23+
timeout(10) {
24+
bat 'docker pull swiftlang/swift-ci:lldb-windowsservercore-1809'
25+
}
2426
}
2527
}
2628

@@ -36,21 +38,27 @@ pipeline {
3638

3739
stage('Print Machine Info') {
3840
steps {
39-
bat '''
40-
docker run --rm ^
41-
swiftlang/swift-ci:lldb-windowsservercore-1809 ^
42-
powershell -Command "cmake --version; ninja --version; python --version; swig -version"
43-
'''
41+
timeout(5) {
42+
bat '''
43+
docker run --rm ^
44+
swiftlang/swift-ci:lldb-windowsservercore-1809 ^
45+
powershell -Command "cmake --version; ninja --version; python --version; swig -version"
46+
'''
47+
}
4448
}
4549
}
4650

4751
stage('Build and Test') {
4852
steps {
49-
timeout(240) {
53+
timeout(60) {
5054
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
5155
writeFile file: 'build.bat', text: '''@echo off
5256
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat" || exit /b 1
5357
58+
set "PATH=%PATH%;C:\\Program Files\\Git\\usr\\bin"
59+
60+
if not exist ..\\llvm-build\\test mkdir ..\\llvm-build\\test
61+
5462
cmake -G Ninja ^
5563
-S llvm ^
5664
-B ..\\llvm-build\\ ^
@@ -69,11 +77,16 @@ cmake -G Ninja ^
6977
-DLLDB_ENABLE_LUA=OFF ^
7078
-DLLDB_ENABLE_LIBXML2=ON ^
7179
-DLLVM_TARGETS_TO_BUILD=Native ^
72-
-DLLVM_LIT_ARGS="-v --time-tests --xunit-xml-output=C:\\workspace\\llvm-build\\test\\results.xml" ^
80+
-DLLDB_TEST_USE_LLDB_SERVER=0 ^
81+
-DLLVM_LIT_ARGS="-v --time-tests --xunit-xml-output=C:\\workspace\\llvm-build\\test\\results-no-lldb-server.xml" ^
7382
-DPython3_EXECUTABLE="C:\\Program Files\\Python313\\python.exe" || exit /b 1
83+
ninja check-lldb -C ..\\llvm-build || exit /b 1
7484
75-
if not exist ..\\llvm-build\\test mkdir ..\\llvm-build\\test
76-
85+
cmake -G Ninja ^
86+
-S llvm ^
87+
-B ..\\llvm-build\\ ^
88+
-DLLDB_TEST_USE_LLDB_SERVER=1 ^
89+
-DLLVM_LIT_ARGS="-v --time-tests --xunit-xml-output=C:\\workspace\\llvm-build\\test\\results-lldb-server.xml" || exit /b 1
7790
ninja check-lldb -C ..\\llvm-build || exit /b 1
7891
'''
7992
bat '''
@@ -92,10 +105,14 @@ ninja check-lldb -C ..\\llvm-build || exit /b 1
92105

93106
post {
94107
always {
95-
junit allowEmptyResults: true, testResults: 'llvm-build/test/results.xml'
108+
timeout(5) {
109+
junit allowEmptyResults: true, testResults: 'llvm-build/test/results-no-lldb-server.xml,llvm-build/test/results-lldb-server.xml'
110+
}
96111
}
97112
cleanup {
98-
deleteDir()
113+
timeout(5) {
114+
deleteDir()
115+
}
99116
}
100117
}
101118
}

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,3 +216,8 @@
216216
# AMDGPU Memory Model
217217
/llvm/lib/Target/AMDGPU/SIMemoryLegalizer* @Pierre-vh @ritter-x2a
218218
/llvm/lib/Target/AMDGPU/SIInsertWaitcnts* @Pierre-vh @ritter-x2a
219+
220+
# Clang-Tidy tool
221+
/clang-tools-extra/clang-tidy/ @vbvictor @zeyi2
222+
/clang-tools-extra/test/clang-tidy/ @vbvictor @zeyi2
223+
/clang-tools-extra/docs/clang-tidy/ @vbvictor @zeyi2

.github/new-prs-labeler.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -698,11 +698,11 @@ clang:analysis:
698698
clang:ssaf:
699699
- changed-files:
700700
- any-glob-to-any-file:
701-
- clang/docs/ScalableStaticAnalysisFramework/**
702-
- clang/include/clang/ScalableStaticAnalysisFramework/**
703-
- clang/lib/ScalableStaticAnalysisFramework/**
701+
- clang/docs/ScalableStaticAnalysis/**
702+
- clang/include/clang/ScalableStaticAnalysis/**
703+
- clang/lib/ScalableStaticAnalysis/**
704704
- clang/test/Analysis/Scalable/**
705-
- clang/unittests/ScalableStaticAnalysisFramework/**
705+
- clang/unittests/ScalableStaticAnalysis/**
706706

707707
clang:static analyzer:
708708
- changed-files:
@@ -1083,11 +1083,9 @@ backend:MIPS:
10831083

10841084
backend:RISC-V:
10851085
- changed-files:
1086-
- any-glob-to-any-file:
1087-
- '**/*riscv*'
1088-
- '**/*RISCV*'
1089-
- '**/*riscv*/**'
1090-
- '**/*RISCV*/**'
1086+
- all-globs-to-any-file:
1087+
- '{**/*riscv**,**/*RISCV**,**/*riscv*/**,**/*RISCV*/**}'
1088+
- '!libc/config/**'
10911089

10921090
backend:Xtensa:
10931091
- changed-files:

.github/rocm-prs-labeler.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
comgr:
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- amd/comgr/**
5+
6+
hotswap:
7+
- changed-files:
8+
- any-glob-to-any-file:
9+
- amd/comgr/src/hotswap/**
10+
- amd/comgr/test-lit/hotswap/**
11+
- amd/comgr/src/comgr-hotswap*
12+
13+
device-libs:
14+
- changed-files:
15+
- any-glob-to-any-file:
16+
- amd/device-libs/**
17+
18+
hipcc:
19+
- changed-files:
20+
- any-glob-to-any-file:
21+
- amd/hipcc/**
22+
23+
flang:
24+
- changed-files:
25+
- any-glob-to-any-file:
26+
- flang/**
27+
- flang-rt/**
28+
29+
openmp:
30+
- changed-files:
31+
- any-glob-to-any-file:
32+
- openmp/**

.github/workflows/PSDB-amd-staging.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
PR_NUMBER: ${{ github.event.pull_request.number }}
8383
COMMIT_HASH: ${{ github.event.after }}
8484
run: |
85-
docker exec -e JENKINS_JOB_NAME=${{secrets.CI_JENKINS_JOB_NAME}} -e PR_NUMBER=${{ github.event.pull_request.number }} -e COMMIT_HASH=${{ github.event.after }} -e JENKINS_URL=${{secrets.CI_JENKINS_URL}} -e JENKINS_USER=${{secrets.CI_JENKINS_USER}} -e JENKINS_API_TOKEN=${{secrets.CI_JENKINS_TOKEN}} "${{env.CONTAINER_NAME}}" /bin/bash -c "PYTHONHTTPSVERIFY=0 python3 cancel_previous_build.py"
85+
docker exec -e JENKINS_JOB_NAME=${{secrets.CI_JENKINS_JOB_NAME}} -e PR_NUMBER=${{ github.event.pull_request.number }} -e COMMIT_HASH=${{ github.event.after }} -e JENKINS_URL=${{secrets.CI_JENKINS_URL}} -e JENKINS_USER=${{secrets.CI_JENKINS_USER}} -e JENKINS_API_TOKEN=${{secrets.CI_JENKINS_TOKEN}} "${{env.CONTAINER_NAME}}" /bin/bash -c "python3 cancel_previous_build.py"
8686
8787
8888
# Runs a set of commands using the runners shell
@@ -113,7 +113,7 @@ jobs:
113113
echo "--Running jenkins_api.py with input sha - $input_sha for pull request - $input_pr_url"
114114
docker exec -e GITHUB_REPOSITORY="$GITHUB_REPOSITORY" -e svc_acc_org_secret="$svc_acc_org_secret" -e input_sha="$input_sha" -e input_pr_url="$input_pr_url" -e pipeline_name="$pipeline_name" \
115115
-e input_pr_num="$input_pr_num" -e PR_TITLE="$PR_TITLE" -e JENKINS_URL="$JENKINS_URL" -e GITHUB_PAT="$svc_acc_org_secret" "${{env.CONTAINER_NAME}}" \
116-
/bin/bash -c 'echo \"PR NUM: "$input_pr_num"\" && PYTHONHTTPSVERIFY=0 python3 jenkins_api.py -s \"${JENKINS_URL}\" -jn "$pipeline_name" -ghr "$GITHUB_REPOSITORY" -ghsha "$input_sha" -ghprn "$input_pr_num" -ghpru "$input_pr_url" -ghprt "$PR_TITLE" -ghpat="$svc_acc_org_secret"'
116+
/bin/bash -c 'echo \"PR NUM: "$input_pr_num"\" && python3 jenkins_api.py -s \"${JENKINS_URL}\" -jn "$pipeline_name" -ghr "$GITHUB_REPOSITORY" -ghsha "$input_sha" -ghprn "$input_pr_num" -ghpru "$input_pr_url" -ghprt "$PR_TITLE" -ghpat="$svc_acc_org_secret"'
117117
118118
- name: Stop and remove container
119119
if: always()

.github/workflows/build_metadata_extractor.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,17 @@ def extract_submodule_table(self, manifest_data):
8383
continue
8484
submodule_url = f"{commit_base_url}/{submodule_name}"
8585
commit_url = f"{submodule_url}/commit/{pin_sha}"
86-
table += f'| {submodule_name} | ({commit_url}) |\n'
86+
short_sha = pin_sha[:12]
87+
table += f'| {submodule_name} | [{short_sha}]({commit_url}) |\n'
8788

8889
return table
8990

9091
def generate_manifest_artifact_logs_table(self):
9192
"""Creates a table for Rock Manifest, Artifacts, and Build Logs."""
9293
table = '| Description | URL |\n|-------------|-----|\n'
93-
#table += f'| Rock Manifest | ({self.rock_manifest_url}) |\\n'
94-
table += f'| Artifacts | ({self.artifacts_url}) |\\n'
95-
table += f'| Build Logs | ({self.build_logs_url}) |\\n'
94+
#table += f'| Rock Manifest | [Rock Manifest]({self.rock_manifest_url}) |\n'
95+
table += f'| Artifacts | [Artifacts]({self.artifacts_url}) |\n'
96+
table += f'| Build Logs | [Build Logs]({self.build_logs_url}) |\n'
9697

9798
return table
9899

@@ -117,7 +118,7 @@ def list_failures(self):
117118
for job in failure_jobs:
118119
job_name = job['name']
119120
job_url = job['html_url']
120-
failure_table += f'| {job_name} | ({job_url}) |\\n'
121+
failure_table += f'| {job_name} | [job]({job_url}) |\n'
121122
return failure_table
122123

123124
def save_results_to_file(self,submodule_table, manifest_artifacts_table, failure_table):

.github/workflows/libcxx-run-benchmarks.yml

Lines changed: 65 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ on:
1818
- created
1919
- edited
2020

21-
env:
22-
CC: clang-22
23-
CXX: clang++-22
24-
2521
jobs:
2622
permission-check:
2723
if: >-
@@ -45,12 +41,12 @@ jobs:
4541
LLVM_TOKEN_GENERATOR_CLIENT_ID: ${{ secrets.LLVM_TOKEN_GENERATOR_CLIENT_ID }}
4642
LLVM_TOKEN_GENERATOR_PRIVATE_KEY: ${{ secrets.LLVM_TOKEN_GENERATOR_PRIVATE_KEY }}
4743

48-
run-benchmarks:
49-
permissions:
50-
pull-requests: write
51-
runs-on: llvm-premerge-libcxx-next-runners # TODO: This should run on a dedicated set of machines
44+
extract-info:
45+
runs-on: ubuntu-24.04
5246
needs:
5347
- permission-check
48+
permissions:
49+
pull-requests: write
5450
steps:
5551
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5652
with:
@@ -78,59 +74,103 @@ jobs:
7874
BENCHMARKS=$(echo "$COMMENT_BODY" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
7975
echo "benchmarks=${BENCHMARKS}" >> ${GITHUB_OUTPUT}
8076
81-
- name: Update comment with link to the job
82-
env:
83-
JOB_CHECK_RUN_ID: ${{ job.check_run_id }}
77+
- name: Update comment with link to the run
8478
run: |
8579
source .venv/bin/activate
8680
cat <<EOF | python
8781
import github
8882
repo = github.Github(auth=github.Auth.Token("${{ github.token }}")).get_repo("${{ github.repository }}")
8983
pr = repo.get_pull(${{ github.event.issue.number }})
9084
comment = pr.get_issue_comment(${{ github.event.comment.id }})
91-
add_text = "> _Running benchmarks in ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${JOB_CHECK_RUN_ID}_"
85+
add_text = "> _Running benchmarks in ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}_"
9286
comment.edit('\n\n'.join([comment.body, add_text]))
9387
EOF
88+
outputs:
89+
pr_base: ${{ steps.vars.outputs.pr_base }}
90+
pr_head: ${{ steps.vars.outputs.pr_head }}
91+
benchmarks: ${{ steps.vars.outputs.benchmarks }}
9492

93+
run-benchmarks:
94+
strategy:
95+
matrix:
96+
include:
97+
- platform: macOS 26.5 arm64
98+
runner: ["self-hosted", "macOS", "ARM64", "26", "26.5"]
99+
cc: clang
100+
cxx: clang++
101+
install-python: false
102+
install-macos-dependencies: true
103+
- platform: Linux x86_64
104+
runner: llvm-premerge-libcxx-next-runners
105+
cc: clang-22
106+
cxx: clang++-22
107+
install-python: true
108+
install-macos-dependencies: false
109+
fail-fast: false
110+
permissions:
111+
pull-requests: write
112+
runs-on: ${{ matrix.runner }}
113+
needs:
114+
- extract-info
115+
env:
116+
CC: ${{ matrix.cc }}
117+
CXX: ${{ matrix.cxx }}
118+
steps:
95119
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
96120
with:
97121
persist-credentials: false
98-
ref: ${{ steps.vars.outputs.pr_head }}
122+
ref: ${{ needs.extract-info.outputs.pr_head }}
99123
fetch-depth: 0
100124
fetch-tags: true # This job requires access to all the Git branches so it can diff against (usually) main
101-
path: repo # Avoid nuking the workspace, where we have the Python virtualenv
125+
126+
- name: Install Python
127+
if: ${{ matrix.install-python }}
128+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
129+
with:
130+
python-version: '3.14'
131+
132+
- name: Install Ninja and CMake
133+
if: ${{ matrix.install-macos-dependencies }}
134+
run: |
135+
brew install ninja cmake
136+
137+
- name: Setup virtual environment
138+
run: |
139+
python3 -m venv .venv
140+
source .venv/bin/activate
141+
python -m pip install -r libcxx/utils/requirements.txt
142+
python -m pip install pygithub==2.8.1
102143
103144
- name: Build and run baseline
104145
env:
105-
BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
106-
PR_HEAD: ${{ steps.vars.outputs.pr_head }}
107-
PR_BASE: ${{ steps.vars.outputs.pr_base }}
146+
BENCHMARKS: ${{ needs.extract-info.outputs.benchmarks }}
147+
PR_HEAD: ${{ needs.extract-info.outputs.pr_head }}
148+
PR_BASE: ${{ needs.extract-info.outputs.pr_base }}
108149
run: |
109-
source .venv/bin/activate && cd repo
110-
python -m pip install -r libcxx/utils/requirements.txt
150+
source .venv/bin/activate
111151
baseline_commit=$(git merge-base $PR_BASE $PR_HEAD)
112152
./libcxx/utils/build-at-commit --commit ${baseline_commit} --install-dir install/baseline -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
113153
./libcxx/utils/test-at-commit --libcxx-installation install/baseline -B benchmarks/baseline -- -sv -j1 --param optimization=speed "$BENCHMARKS"
114154
./libcxx/utils/consolidate-benchmarks benchmarks/baseline | tee baseline.lnt
115155
116156
- name: Build and run candidate
117157
env:
118-
BENCHMARKS: ${{ steps.vars.outputs.benchmarks }}
119-
PR_HEAD: ${{ steps.vars.outputs.pr_head }}
158+
BENCHMARKS: ${{ needs.extract-info.outputs.benchmarks }}
159+
PR_HEAD: ${{ needs.extract-info.outputs.pr_head }}
120160
run: |
121-
source .venv/bin/activate && cd repo
161+
source .venv/bin/activate
122162
./libcxx/utils/build-at-commit --commit $PR_HEAD --install-dir install/candidate -- -DCMAKE_BUILD_TYPE=RelWithDebInfo
123163
./libcxx/utils/test-at-commit --libcxx-installation install/candidate -B benchmarks/candidate -- -sv -j1 --param optimization=speed "$BENCHMARKS"
124164
./libcxx/utils/consolidate-benchmarks benchmarks/candidate | tee candidate.lnt
125165
126166
- name: Compare baseline and candidate runs
127167
run: |
128-
source .venv/bin/activate && cd repo
168+
source .venv/bin/activate
129169
./libcxx/utils/compare-benchmarks baseline.lnt candidate.lnt | tee results.txt
130170
131171
- name: Update comment with results
132172
run: |
133-
source .venv/bin/activate && cd repo
173+
source .venv/bin/activate
134174
cat <<EOF | python
135175
import github
136176
repo = github.Github(auth=github.Auth.Token("${{ github.token }}")).get_repo("${{ github.repository }}")
@@ -144,7 +184,7 @@ jobs:
144184
145185
<details>
146186
<summary>
147-
Benchmark results:
187+
Benchmark results for ${{ matrix.platform }}:
148188
</summary>
149189
150190
\`\`\`

0 commit comments

Comments
 (0)