Skip to content

Commit e1c56fc

Browse files
Jenkinsronlieb
authored andcommitted
merge main into amd-staging
revert: breaks spirv 4a0d53a PatternMatch: migrate to CmpPredicate (llvm#118534) Change-Id: I0311c30089f70d9f063cc1e0af8379e406168f40
2 parents 422a454 + 2135bab commit e1c56fc

File tree

233 files changed

+13154
-9755
lines changed

Some content is hidden

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

233 files changed

+13154
-9755
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Build Windows CI Container
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- .github/workflows/build-ci-container-windows.yml
12+
- '.github/workflows/containers/github-action-ci-windows/**'
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- .github/workflows/build-ci-container-windows.yml
18+
- '.github/workflows/containers/github-action-ci-windows/**'
19+
20+
jobs:
21+
build-ci-container-windows:
22+
if: github.repository_owner == 'llvm'
23+
runs-on: windows-2019
24+
outputs:
25+
container-name: ${{ steps.vars.outputs.container-name }}
26+
container-name-tag: ${{ steps.vars.outputs.container-name-tag }}
27+
container-filename: ${{ steps.vars.outputs.container-filename }}
28+
steps:
29+
- name: Checkout LLVM
30+
uses: actions/checkout@v4
31+
with:
32+
sparse-checkout: .github/workflows/containers/github-action-ci-windows
33+
- name: Write Variables
34+
id: vars
35+
run: |
36+
$tag = [int64](Get-Date -UFormat %s)
37+
$container_name="ghcr.io/$env:GITHUB_REPOSITORY_OWNER/ci-windows-2019"
38+
echo "container-name=${container_name}" >> $env:GITHUB_OUTPUT
39+
echo "container-name-tag=${container_name}:${tag}" >> $env:GITHUB_OUTPUT
40+
echo "container-filename=ci-windows-${tag}.tar" >> $env:GITHUB_OUTPUT
41+
- name: Build Container
42+
working-directory: .github/workflows/containers/github-action-ci-windows
43+
run: |
44+
docker build -t ${{ steps.vars.outputs.container-name-tag }} .
45+
- name: Save container image
46+
run: |
47+
docker save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
48+
- name: Upload container image
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: container
52+
path: ${{ steps.vars.outputs.container-filename }}
53+
retention-days: 14
54+
55+
push-ci-container:
56+
if: github.event_name == 'push'
57+
needs:
58+
- build-ci-container-windows
59+
permissions:
60+
packages: write
61+
runs-on: windows-2019
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
steps:
65+
- name: Download container
66+
uses: actions/download-artifact@v4
67+
with:
68+
name: container
69+
- name: Push Container
70+
run: |
71+
docker load -i ${{ needs.build-ci-container.outptus.container-filename }}
72+
docker tag ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}:latest
73+
docker login -u ${{ github.actor }} -p $env:GITHUB_TOKEN ghcr.io
74+
docker push ${{ needs.build-ci-container.outputs.container-name-tag }}
75+
docker push ${{ needs.build-ci-container.outputs.container-name }}:latest
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Agent image for LLVM org cluster.
2+
# .net 4.8 is required by chocolately package manager.
3+
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
4+
5+
# Restore the default Windows shell for correct batch processing.
6+
SHELL ["cmd", "/S", "/C"]
7+
8+
# Download the Build Tools bootstrapper.
9+
ADD https://aka.ms/vs/16/release/vs_buildtools.exe /TEMP/vs_buildtools.exe
10+
11+
RUN powershell -Command Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
12+
13+
# Download channel for fixed install.
14+
ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel
15+
ADD ${CHANNEL_URL} /TEMP/VisualStudio.chman
16+
17+
# Install Build Tools with C++ workload.
18+
# - Documentation for docker installation
19+
# https://docs.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2019
20+
# - Documentation on workloads
21+
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019#c-build-tools
22+
# - Documentation on flags
23+
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2019
24+
RUN /TEMP/vs_buildtools.exe --quiet --wait --norestart --nocache \
25+
--channelUri C:\TEMP\VisualStudio.chman \
26+
--installChannelUri C:\TEMP\VisualStudio.chman \
27+
--installPath C:\BuildTools \
28+
--add Microsoft.VisualStudio.Workload.VCTools \
29+
--add Microsoft.VisualStudio.Component.VC.ATL \
30+
--includeRecommended \
31+
|| IF "%ERRORLEVEL%"=="3010" EXIT 0
32+
33+
# Register DIA dll (Debug Interface Access) so it can be used to symbolize
34+
# the stack traces. Register dll for 32 and 64 bit.
35+
# see https://developercommunity.visualstudio.com/content/problem/290674/msdia140dll-is-not-registered-on-vs2017-hosts.html
36+
37+
RUN regsvr32 /S "C:\BuildTools\DIA SDK\bin\amd64\msdia140.dll" & \
38+
regsvr32 /S "C:\BuildTools\DIA SDK\bin\msdia140.dll"
39+
40+
# install tools as described in https://llvm.org/docs/GettingStartedVS.html
41+
# and a few more that were not documented...
42+
RUN choco install -y ninja git
43+
# Pin an older version of Python; the current Python 3.10 fails when
44+
# doing "pip install" for the other dependencies, as it fails to find libxml
45+
# while compiling some package.
46+
RUN choco install -y python3 --version 3.9.7
47+
48+
# ActivePerl is currently not installable via Chocolatey, see
49+
# http://disq.us/p/2ipditb. Install StrawberryPerl instead. Unfortunately,
50+
# StrawberryPerl not only installs Perl, but also a redundant C/C++ compiler
51+
# toolchain, and a copy of pkg-config which can cause misdetections for other
52+
# built products, see
53+
# https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/11 for further
54+
# details. Remove the redundant and unnecessary parts of the StrawberryPerl
55+
# install.
56+
RUN choco install -y strawberryperl && \
57+
rmdir /q /s c:\strawberry\c && \
58+
del /q c:\strawberry\perl\bin\pkg-config*
59+
60+
# libcxx requires clang(-cl) to be available
61+
RUN choco install -y sccache llvm
62+
RUN pip install psutil
63+
64+
RUN curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20230320/llvm-mingw-20230320-ucrt-x86_64.zip && \
65+
powershell Expand-Archive llvm-mingw-*-ucrt-x86_64.zip -DestinationPath . && \
66+
del llvm-mingw-*-ucrt-x86_64.zip && \
67+
ren llvm-mingw-20230320-ucrt-x86_64 llvm-mingw
68+
69+
# configure Python encoding
70+
ENV PYTHONIOENCODING=UTF-8
71+
72+
# update the path variable
73+
# C:\Program Files\Git\usr\bin contains a usable bash and other unix tools.
74+
# C:\llvm-mingw\bin contains Clang configured for mingw targets and
75+
# corresponding sysroots. Both the 'llvm' package (with Clang defaulting
76+
# to MSVC targets) and this directory contains executables named
77+
# 'clang.exe' - add this last to let the other one have precedence.
78+
# To use these compilers, use the triple prefixed form, e.g.
79+
# x86_64-w64-mingw32-clang.
80+
# C:\buildtools and SDK paths are ones that are set by c:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=amd64 -host_arch=amd64
81+
RUN powershell -Command \
82+
[System.Environment]::SetEnvironmentVariable('PATH', \
83+
[System.Environment]::GetEnvironmentVariable('PATH', 'machine') + ';C:\Program Files\Git\usr\bin;C:\llvm-mingw\bin' \
84+
+ ';C:\BuildTools\Common7\IDE\' \
85+
+ ';C:\BuildTools\Common7\IDE\CommonExt ensions\Microsoft\TeamFoundation\Team Explorer' \
86+
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin' \
87+
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja' \
88+
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer' \
89+
+ ';C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow' \
90+
+ ';C:\BuildTools\Common7\IDE\VC\VCPackages' \
91+
+ ';C:\BuildTools\Common7\Tools\' \
92+
+ ';C:\BuildTools\Common7\Tools\devinit' \
93+
+ ';C:\BuildTools\MSBuild\Current\Bin' \
94+
+ ';C:\BuildTools\MSBuild\Current\bin\Roslyn' \
95+
+ ';C:\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64' \
96+
+ ';C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\' \
97+
+ ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64' \
98+
+ ';C:\Program Files (x86)\Windows Kits\10\bin\x64' \
99+
+ ';C:\Windows\Microsoft.NET\Framework64\v4.0.30319' \
100+
,'machine')
101+
102+
# support long file names during git checkout
103+
RUN git config --system core.longpaths true & \
104+
git config --global core.autocrlf false
105+
106+
# handle for debugging of files beeing locked by some processes.
107+
RUN choco install -y handle
108+
109+
RUN pip3 install pywin32 buildbot-worker==2.8.4
110+
111+
ARG RUNNER_VERSION=2.319.1
112+
ENV RUNNER_VERSION=$RUNNER_VERSION
113+
114+
RUN powershell -Command \
115+
Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v${env:RUNNER_VERSION}/actions-runner-win-x64-${env:RUNNER_VERSION}.zip -OutFile actions-runner-win.zip ; \
116+
Add-Type -AssemblyName System.IO.Compression.FileSystem ; \
117+
[System.IO.Compression.ZipFile]::ExtractToDirectory('actions-runner-win.zip', $PWD) ;\
118+
rm actions-runner-win.zip

.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:22.04 as base
22
ENV LLVM_SYSROOT=/opt/llvm
33

44
FROM base as stage1-toolchain
5-
ENV LLVM_VERSION=19.1.2
5+
ENV LLVM_VERSION=19.1.5
66

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

.github/workflows/docs.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ jobs:
9494
flang:
9595
- 'flang/docs/**'
9696
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
97+
workflow:
98+
- '.github/workflows/docs.yml'
9799
- name: Fetch LLVM sources (PR)
98100
if: ${{ github.event_name == 'pull_request' }}
99101
uses: actions/checkout@v4
@@ -115,77 +117,99 @@ jobs:
115117
- name: Setup output folder
116118
run: mkdir built-docs
117119
- name: Build LLVM docs
118-
if: steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true'
120+
if: |
121+
steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true' ||
122+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
119123
run: |
120124
cmake -B llvm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON ./llvm
121125
TZ=UTC ninja -C llvm-build docs-llvm-html docs-llvm-man
122126
mkdir built-docs/llvm
123127
cp -r llvm-build/docs/* built-docs/llvm/
124128
- name: Build Clang docs
125-
if: steps.docs-changed-subprojects.outputs.clang_any_changed == 'true'
129+
if: |
130+
steps.docs-changed-subprojects.outputs.clang_any_changed == 'true' ||
131+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
126132
run: |
127133
cmake -B clang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_SPHINX=ON ./llvm
128134
TZ=UTC ninja -C clang-build docs-clang-html docs-clang-man
129135
mkdir built-docs/clang
130136
cp -r clang-build/docs/* built-docs/clang/
131137
- name: Build clang-tools-extra docs
132-
if: steps.docs-changed-subprojects.outputs.clang-tools-extra_any_changed == 'true'
138+
if: |
139+
steps.docs-changed-subprojects.outputs.clang-tools-extra_any_changed == 'true' ||
140+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
133141
run: |
134142
cmake -B clang-tools-extra-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_ENABLE_SPHINX=ON ./llvm
135143
TZ=UTC ninja -C clang-tools-extra-build docs-clang-tools-html docs-clang-tools-man
136144
mkdir built-docs/clang-tools-extra
137145
cp -r clang-tools-extra-build/docs/* built-docs/clang-tools-extra/
138146
- name: Build LLDB docs
139-
if: steps.docs-changed-subprojects.outputs.lldb_any_changed == 'true'
147+
if: |
148+
steps.docs-changed-subprojects.outputs.lldb_any_changed == 'true' ||
149+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
140150
run: |
141151
cmake -B lldb-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_ENABLE_SPHINX=ON ./llvm
142152
TZ=UTC ninja -C lldb-build docs-lldb-html docs-lldb-man
143153
mkdir built-docs/lldb
144154
cp -r lldb-build/docs/* built-docs/lldb/
145155
- name: Build libunwind docs
146-
if: steps.docs-changed-subprojects.outputs.libunwind_any_changed == 'true'
156+
if: |
157+
steps.docs-changed-subprojects.outputs.libunwind_any_changed == 'true' ||
158+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
147159
run: |
148160
cmake -B libunwind-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
149161
TZ=UTC ninja -C libunwind-build docs-libunwind-html
150162
mkdir built-docs/libunwind
151163
cp -r libunwind-build/libunwind/docs/* built-docs/libunwind
152164
- name: Build libcxx docs
153-
if: steps.docs-changed-subprojects.outputs.libcxx_any_changed == 'true'
165+
if: |
166+
steps.docs-changed-subprojects.outputs.libcxx_any_changed == 'true' ||
167+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
154168
run: |
155169
cmake -B libcxx-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx;libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
156170
TZ=UTC ninja -C libcxx-build docs-libcxx-html
157171
mkdir built-docs/libcxx
158172
cp -r libcxx-build/libcxx/docs/* built-docs/libcxx/
159173
- name: Build libc docs
160-
if: steps.docs-changed-subprojects.outputs.libc_any_changed == 'true'
174+
if: |
175+
steps.docs-changed-subprojects.outputs.libc_any_changed == 'true' ||
176+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
161177
run: |
162178
cmake -B libc-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libc" -DLLVM_ENABLE_SPHINX=ON ./runtimes
163179
TZ=UTC ninja -C libc-build docs-libc-html
164180
mkdir built-docs/libc
165181
cp -r libc-build/libc/docs/* built-docs/libc/
166182
- name: Build LLD docs
167-
if: steps.docs-changed-subprojects.outputs.lld_any_changed == 'true'
183+
if: |
184+
steps.docs-changed-subprojects.outputs.lld_any_changed == 'true' ||
185+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
168186
run: |
169187
cmake -B lld-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="lld" -DLLVM_ENABLE_SPHINX=ON ./llvm
170188
TZ=UTC ninja -C lld-build docs-lld-html
171189
mkdir built-docs/lld
172190
cp -r lld-build/docs/* built-docs/lld/
173191
- name: Build OpenMP docs
174-
if: steps.docs-changed-subprojects.outputs.openmp_any_changed == 'true'
192+
if: |
193+
steps.docs-changed-subprojects.outputs.openmp_any_changed == 'true' ||
194+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
175195
run: |
176196
cmake -B openmp-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;openmp" -DLLVM_ENABLE_SPHINX=ON ./llvm
177197
TZ=UTC ninja -C openmp-build docs-openmp-html
178198
mkdir built-docs/openmp
179199
cp -r openmp-build/docs/* built-docs/openmp/
180200
- name: Build Polly docs
181-
if: steps.docs-changed-subprojects.outputs.polly_any_changed == 'true'
201+
if: |
202+
steps.docs-changed-subprojects.outputs.polly_any_changed == 'true' ||
203+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
182204
run: |
183205
cmake -B polly-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="polly" -DLLVM_ENABLE_SPHINX=ON ./llvm
184206
TZ=UTC ninja -C polly-build docs-polly-html docs-polly-man
185207
mkdir built-docs/polly
186208
cp -r polly-build/docs/* built-docs/polly/
187209
- name: Build Flang docs
188-
if: steps.docs-changed-subprojects.outputs.flang_any_changed == 'true'
210+
if: |
211+
steps.docs-changed-subprojects.outputs.flang_any_changed == 'true' ||
212+
steps.docs-changed-subprojects.outputs.workflow_any_changed == 'true'
189213
run: |
190214
cmake -B flang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;mlir;flang" -DLLVM_ENABLE_SPHINX=ON ./llvm
191215
TZ=UTC ninja -C flang-build docs-flang-html

bolt/test/merge-fdata-bat-no-lbr.test

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Check that merge-fdata correctly handles merging two fdata files with both boltedcollection and no_lbr tags.
2+
3+
# REQUIRES: system-linux
4+
5+
# RUN: split-file %s %t
6+
# RUN: merge-fdata %t/a.fdata %t/b.fdata -o %t/merged.fdata
7+
# RUN: FileCheck %s --input-file %t/merged.fdata
8+
9+
# CHECK: boltedcollection
10+
# CHECK: no_lbr
11+
# CHECK: main 2
12+
13+
#--- a.fdata
14+
boltedcollection
15+
no_lbr
16+
main 1
17+
#--- b.fdata
18+
boltedcollection
19+
no_lbr
20+
main 1

bolt/test/merge-fdata-lbr-mode.test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Check that merge-fdata tool doesn't falsely print no_lbr when not in no-lbr mode
2+
3+
# REQUIRES: system-linux
4+
5+
# RUN: split-file %s %t
6+
# RUN: merge-fdata %t/a.fdata %t/b.fdata -o %t/merged.fdata
7+
# RUN: FileCheck %s --input-file %t/merged.fdata
8+
9+
# CHECK-NOT: no_lbr
10+
# CHECK: main 2
11+
12+
#--- a.fdata
13+
main 1
14+
#--- b.fdata
15+
main 1
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Check that merge-fdata doesn't incorrectly merge two fdata files with boltedcollection and no_lbr tags.
2+
3+
# REQUIRES: system-linux
4+
5+
# RUN: split-file %s %t
6+
# RUN: not merge-fdata %t/a.fdata %t/b.fdata 2>&1 | FileCheck %s
7+
8+
# CHECK: cannot mix profile collected in BOLT and non-BOLT deployments
9+
10+
#--- a.fdata
11+
boltedcollection
12+
no_lbr
13+
main 1
14+
#--- b.fdata
15+
no_lbr
16+
main 1

bolt/test/merge-fdata-mixed-mode.test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Check that merge-fdata tool correctly reports error message
2+
## when trying to merge 'no-lbr' and 'lbr' profiles
3+
4+
# REQUIRES: system-linux
5+
6+
# RUN: split-file %s %t
7+
# RUN: not merge-fdata %t/a.fdata %t/b.fdata 2>&1 | FileCheck %s
8+
9+
# CHECK: cannot mix 'no_lbr' and 'lbr' profiles.
10+
11+
#--- a.fdata
12+
no_lbr
13+
main 1
14+
#--- b.fdata
15+
main 1

0 commit comments

Comments
 (0)