640 Commits

Author SHA1 Message Date
Jannick Kremer
0da291f8a6 Revert "Move python binding tests to lit framework" (#149012)
This reverts commit f8707f994af2582f6dc58190106946efeb43bf05.

(cherry picked from commit 7a9bef0166951a61bc7094514a20471ae45f6090)
2025-07-22 10:33:35 +02:00
Aiden Grossman
cbe68e5140 [libcxx] Switch to release branch runners
This ensures that if/when we bump the toolchain versions in the main
container that we do not break tests on the release branch.
2025-07-22 10:32:35 +02:00
Aiden Grossman
46c566f579 [CI][Github] Switch windows to server 2022 (#148743)
This patch switches the windows testing over to server 2022 by switching
to the recently introduced runner set.

(cherry picked from commit 3248a6d76abccbbe78e853c76bc022b70d594347)
2025-07-17 10:29:31 +02:00
Jannick Kremer
ec149d5ef8
[clang][python][test] Move python binding tests to lit framework (#148802)
As discussed in PR #142353, the current testsuite of the `clang` Python
bindings has several issues:

- It `libclang.so` cannot be loaded into `python` to run the testsuite,
the whole `ninja check-all` aborts.
- The result of running the testsuite isn't report like the `lit`-based
tests, rendering them almost invisible.
- The testsuite is disabled in a non-obvious way (`RUN_PYTHON_TESTS`) in
`tests/CMakeLists.txt`, which again doesn't show up in the test results.

All these issues can be avoided by integrating the Python bindings tests
with `lit`, which is what this patch does:

- The actual test lives in `clang/test/bindings/python/bindings.sh` and
is run by `lit`.
- The current `clang/bindings/python/tests` directory (minus the
now-subperfluous `CMakeLists.txt`) is moved into the same directory.
- The check if `libclang` is loadable (originally from PR #142353) is
now handled via a new `lit` feature, `libclang-loadable`.
- The various ways to disable the tests have been turned into `XFAIL`s
as appropriate. This isn't complete and not completely tested yet.

Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`,
`i386-pc-solaris2.11`, `amd64-pc-solaris2.11`, `i686-pc-linux-gnu`, and
`x86_64-pc-linux-gnu`.

Co-authored-by: Rainer Orth <ro@gcc.gnu.org>
2025-07-15 12:48:24 +02:00
Nikolas Klauser
339a1f2e8f
Revert "[libc++][hardening] Introduce assertion semantics" (#148822)
Reverts llvm/llvm-project#148268

It looks like this was based on #148266, which I reverted in #148787.
2025-07-15 12:43:37 +02:00
Konstantin Varlamov
7345508c6f
[libc++][hardening] Introduce assertion semantics (#148268)
Assertion semantics closely mimic C++26 Contracts evaluation semantics.
This brings our implementation closer in line with C++26 Library
Hardening (one particular benefit is that using the `observe` semantic
makes adopting hardening easier for projects).
2025-07-15 02:14:30 -07:00
Aiden Grossman
968b2389ce
[CI][Github] Version pin packages in windows container
I spent several hours debugging failures in the server 2022 container
today that turned out to be related to a new ninja release from a couple
weeks ago. This patch version pins all the packages so they do not
spuriously upgrade and we can control the process to waste less effort
debugging changes due to version changes.

Reviewers: cmtice, tstellar, lnihlen

Reviewed By: cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/148319
2025-07-14 10:46:06 -07:00
Aiden Grossman
3e43915be6
[CI][Github] Bump Windows Container to Server 2022
This patch bumps the windows CI container to windows server 2022 from
windows server 2019. This is necessary as Github has sunsetted support
for sever 2019, so we cannot build the container through GHA without
updating. Using more recent versions is just good practice anyways.

This will not roll out immediately and we'll have to make some TF
changes to get deployed, but some additional validation first will be
good anyways.

Reviewers: lnihlen, tstellar, cmtice

Reviewed By: cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/148318
2025-07-14 08:24:54 -07:00
Peter Collingbourne
be7a21622e
Improve file patterns for some backends.
I noticed that one of my PRs, #147624, did not get automatically
labelled with `backend:RISC-V` when it touched a test under
`llvm/test/CodeGen/RISCV`. This seems to be because the pattern only
looks for files named `*RISCV*` or `*riscv* and not necessarily files
in a directory named like that. To fix that, let's make RISC-V use
a more accepting pattern, similar to AMDGPU, and do the same for two
other backends.

Reviewers: tstellar, arsenm

Reviewed By: arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/147633
2025-07-11 18:05:39 -07:00
Aiden Grossman
a386d0e13f
[Github] Bump CI Container to 20.1.8 (#148104)
This patch bumps the LLVM toolchain version within the CI container to
20.1.8.
2025-07-11 07:25:46 -07:00
Owen Pan
b01ef20c5b
[GitHub][workflows] Use latest clang-format version 20.1.8 (#148099) 2025-07-10 22:26:33 -07:00
Matheus Izvekov
8a7c973f64
[ci] premerge: upload artifacts even on failure (#147999)
This makes sure we upload the artifacts even if the previous step
failed.

This is helpful because we wish to upload crash reproducers, which the
scritps are already prepared to do.

Example:
https://github.com/llvm/llvm-project/actions/runs/16180778101/job/45676677544?pr=147835
2025-07-10 15:10:12 -03:00
cmtice
582cfb142c
[libc++] Switch over to the LLVM-wide premerge test runners. (#147794)
Update the premerge testing system to use the LLVM-wide premerge
infrastructure. Also remove libcxx-restart-preempted-jobs.yaml, as this
should no longer be needed.
2025-07-10 10:34:01 -07:00
Aiden Grossman
8c32f9517a
[CI][Github] Remove MAX_PARALLEL_*_JOBS Args from Windows Runs (#147770)
This patch removes setting the MAX_PARLLEL_COMPILE_JOBS and
MAX_PARALLEL_LINK_JOBS env variables in the windows runs. These were
originally used to control the parallelism on the old infrastructure and
we set them on the new infrastructure explicitly so that we could
maintain both at the same time. Now it does not make sense to keep them
explicitly set that we do not need to explicitly control the parallelism
given the amount of RAM we have on the machines. This also adds a
maintnenace cost as evidenced by the fact that these have been incorrect
(64 instead of 32) for quite a while.
2025-07-09 10:25:09 -07:00
Aiden Grossman
cb7b0693c6
[Github][CI] Bump Github Runner Version in CI Container to v2.326.0 (#147393)
This is the latest runner version. Looks like it contains some minor
fixes/dependency bumps.
2025-07-07 14:38:24 -07:00
Amy Huang
26a766ae63
Make sure all matrix options are run in libc premerge testing (#146162)
https://github.com/llvm/llvm-project/pull/126315 changes the premerge
testing to build in Debug, Release, and MinSizeRel configs, as opposed
to only MinSizeRel, but for some reason the matrix is not returning all
options now. Fix so that it actually builds the intended configs.

Per discussion in
[146161](https://github.com/llvm/llvm-project/issues/146161), only test
all three configs on Linux x86_64. Other OS's and configurations will
build in Debug mode only.

Also fix a cmake variable and remove outdated comments.

Bug: https://github.com/llvm/llvm-project/issues/146161
2025-07-07 10:19:10 -07:00
Jannick Kremer
d66254e7fe
Revert " Move python binding tests to lit framework (#146844)" (#146931)
This reverts commit 2532bde0388980ac7e299b02bc554e6fde6c686e.
2025-07-03 19:34:19 +02:00
Jannick Kremer
2532bde038
[clang][python][test] Move python binding tests to lit framework (#146844)
As discussed in PR #142353, the current testsuite of the `clang` Python
bindings has several issues:

- It `libclang.so` cannot be loaded into `python` to run the testsuite,
the whole `ninja check-all` aborts.
- The result of running the testsuite isn't report like the `lit`-based
tests, rendering them almost invisible.
- The testsuite is disabled in a non-obvious way (`RUN_PYTHON_TESTS`) in
`tests/CMakeLists.txt`, which again doesn't show up in the test results.

All these issues can be avoided by integrating the Python bindings tests
with `lit`, which is what this patch does:

- The actual test lives in `clang/test/bindings/python/bindings.sh` and
is run by `lit`.
- The current `clang/bindings/python/tests` directory (minus the
now-subperfluous `CMakeLists.txt`) is moved into the same directory.
- The check if `libclang` is loadable (originally from PR #142353) is
now handled via a new `lit` feature, `libclang-loadable`.
- The various ways to disable the tests have been turned into `XFAIL`s
as appropriate. This isn't complete and not completely tested yet.

Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`,
`i386-pc-solaris2.11`, `amd64-pc-solaris2.11`, `i686-pc-linux-gnu`, and
`x86_64-pc-linux-gnu`.

Co-authored-by: Rainer Orth <ro@gcc.gnu.org>
2025-07-03 13:56:54 +02:00
Jannick Kremer
c863e0ebc2
Revert "Move python binding tests to lit framework (#146486)" (#146789)
This reverts commit a75587d2718f76dc53112065da36e08d04034eb9.
2025-07-02 23:41:01 +02:00
Eric
d78036f06e
Only restart failed libc++ jobs, not cancelled ones. (#146397)
Despite the error message for preempted jobs containing the words
"cancelled", these are considered workflow "failures" by github.

This is important, because if we fail to distinguish between "failed"
and "cancelled" jobs, the restarter will fight to restart jobs a user
intentionally cancelled (either by pressing the "cancel" button, or by
pushing an update to a PR).

This reverts commit 3ea7fc73397032e71fb20d27084f4552211bb1f6. This also
reverts earlier attempts to solve this problem by matching the messages
to detect manual cancellations.

This change also removes ldionne's test workflow, as its hard to
correctly keep in sync.

This change does not attempt to address the maintainability or
testability of this script, which continues to be an issue. If asked to
address these issues, my plan is to write the script in python (which
most people are more familar with), and turn this action into a "docker
action" using a container with the python action and dependencies built
into it. Let me know if that's a direction we're interested in heading.
2025-07-02 10:04:37 -04:00
Jannick Kremer
a75587d271
[clang][python][test] Move python binding tests to lit framework (#146486)
As discussed in PR #142353, the current testsuite of the `clang` Python
bindings has several issues:

- It `libclang.so` cannot be loaded into `python` to run the testsuite,
the whole `ninja check-all` aborts.
- The result of running the testsuite isn't report like the `lit`-based
tests, rendering them almost invisible.
- The testsuite is disabled in a non-obvious way (`RUN_PYTHON_TESTS`) in
`tests/CMakeLists.txt`, which again doesn't show up in the test results.

All these issues can be avoided by integrating the Python bindings tests
with `lit`, which is what this patch does:

- The actual test lives in `clang/test/bindings/python/bindings.sh` and
is run by `lit`.
- The current `clang/bindings/python/tests` directory (minus the
now-subperfluous `CMakeLists.txt`) is moved into the same directory.
- The check if `libclang` is loadable (originally from PR #142353) is
now handled via a new `lit` feature, `libclang-loadable`.
- The various ways to disable the tests have been turned into `XFAIL`s
as appropriate. This isn't complete and not completely tested yet.

Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`,
`i386-pc-solaris2.11`, `amd64-pc-solaris2.11`, `i686-pc-linux-gnu`, and
`x86_64-pc-linux-gnu`.

Co-authored-by: Rainer Orth <ro@gcc.gnu.org>
2025-07-02 10:11:48 +02:00
Mircea Trofin
425359a83d
[experimental] Ask copilot to check perf profile degradation (#146271)
We can optionally add copilot as a reviewer. As per
[documentation](https://docs.github.com/en/copilot/how-tos/agents/copilot-code-review/using-copilot-code-review#customizing-copilots-reviews-with-custom-instructions),
we can customize the review. This PR asks it to pay attention to the
kind of code that might corrupt performance data, or, in the case of
sample profiling, result in poor profiles by dropping debug info.
2025-06-30 08:09:28 -07:00
Eric Fiselier
3ea7fc7339 attempt to calm down restarter job 2025-06-28 17:19:24 -04:00
Eric Fiselier
94c1506548 Further restrict the restarters ability to restart manually canceled jobs 2025-06-28 13:05:51 -04:00
Eric Fiselier
169b4bea87 Attempt to fix over-keen restarter.
The restarter will restart jobs that were canceled by a newer change,
causing the new and old change to fight it out.

This change attempts to address this by treating the "canceled" message
as an error.
2025-06-28 12:59:33 -04:00
Chris B
67a5fc8e12
Update references from llvm-beanz to llvm (#146177)
This fixes the HLSL actions to pull from the LLVM organization instead
of the original repository under my personal GitHub.
2025-06-27 20:12:27 -05:00
dyung
b0500f56c8
Revert "[clang][python][test] Move python binding tests to lit framework" (#145951)
Reverts llvm/llvm-project#145855

The test added is XPASS-ing on a bot:
https://lab.llvm.org/buildbot/#/builders/144/builds/28623
2025-06-26 15:02:14 -04:00
Simon Pilgrim
0f87c78f64
[GitHub] Add PR filters for VectorCombine patches (#145896)
Distinguish VectorCombine from the vectorizers without just treating it as part of the InstCombine group

Fixes #145286
2025-06-26 16:01:08 +01:00
Rainer Orth
90c9cc2c98
[clang][python][test] Move python binding tests to lit framework (#145855)
As discussed in PR #142353, the current testsuite of the `clang` Python
bindings has several issues:

- If `libclang.so` cannot be loaded into `python` to run the testsuite,
the whole `ninja check-all` aborts.
- The result of running the testsuite isn't report like the `lit`-based
tests, rendering them almost invisible.
- The testsuite is disabled in a non-obvious way (`RUN_PYTHON_TESTS`) in
`tests/CMakeLists.txt`, which again doesn't show up in the test results.

All these issues can be avoided by integrating the Python bindings tests
with `lit`, which is what this patch does:

- The actual test lives in `clang/test/bindings/python/bindings.sh` and
is run by `lit`.
- The current `clang/bindings/python/tests` directory (minus the
now-superfluous `CMakeLists.txt`) is moved into the same directory.
- The check if `libclang` is loadable (originally from PR #142353) is
now handled via a new `lit` feature, `libclang-loadable`.
- The various ways to disable the tests have been turned into `XFAIL`s
as appropriate.
- AArch64 doesn't `FAIL` any longer, so no `XFAIL` is necessary.
- It keeps the `check-clang-python` target for use by the Clang Python
CI.

Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`,
`i386-pc-solaris2.11`, `amd64-pc-solaris2.11`, `i686-pc-linux-gnu`, and
`x86_64-pc-linux-gnu`.
2025-06-26 16:34:10 +02:00
Aiden Grossman
b7be8786af
Reapply "[CI] Migrate to runtimes build" (#143612)
This reverts commit 6f62979a5a5bcf70d65f23e0991a274e6df5955b.

The reapplies commit 80ea5f46df3e365a0a2112889bb91732167b6214.

That commit was reverted because it was causing compiler-rt test
failures due to tysan not having its dependencies set up properly within
CMake. That situation has since been rectified in
3cef099ceddccefca8e11268624397cde9e04af6.

Reviewers: lnihlen, rnk, gburgessiv, cmtice

Reviewed By: rnk, cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/144033
2025-06-20 15:07:00 -07:00
Eric Fiselier
fda6b751f1 Fix libc++ restarter job.
A while ago, the test workflow was updated with a new preemption regex,
however it was only applied to the test job, and not the job
that's actually restarting the failed libc++ test runs.

This fix should correct the issue and get the restarter working
again.
2025-06-18 09:36:36 -04:00
Matt Arsenault
99e263228f
github: Add mips backend to PR autolabeler (#140909) 2025-06-18 09:28:24 +09:00
Nikolas Klauser
42c82fcc29
[libc++] Upgrade to GCC 15 (#138293) 2025-06-11 20:19:26 +02:00
Baranov Victor
521e6ce5c8
[CI] Add mention of LLVM Developer Policy in email-check message (NFC) (#143300)
As for now, It may be hard for people to get truth from long Discourse
discussion, so a link to official document may be enough to convince
changing email from private to public.
2025-06-11 10:25:29 +03:00
George Burgess IV
6f62979a5a
Revert "[CI] Migrate to runtimes build" (#143612)
Reverts llvm/llvm-project#142696

See https://github.com/llvm/llvm-project/issues/143610 for details; I
believe this PR causes CI builders to build LLVM in a way that's been
broken for a while. To keep CI green, if this is the correct culprit,
those tests should be fixed or skipped
2025-06-10 17:57:16 -06:00
Aiden Grossman
80ea5f46df
[CI] Migrate to runtimes build
This patch migrates the premerge pipeline to use LLVM_ENABLE_RUNTIMES to
build libc and compiler-rt.

Reviewers: DavidSpickett, tstellar, cmtice, lnihlen

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/142696
2025-06-10 08:11:25 +00:00
Aiden Grossman
9cd53787df
[Github] Test docs-flang-man target in documentation job (#142860)
This was recently added in 47171ac3f911541453a69f3d9c6b4c1777409b95. We
should be supporting testing this inside the docs job.
2025-06-04 17:39:58 -07:00
Matt Arsenault
407a338990
github: Add lib/CodeGen to PR autolabeler (#138131)
Try to exclude SelectionDAG and GlobalISel since those have
their own labels
2025-06-03 23:54:25 +09:00
Aiden Grossman
09cd3edc9a [Github] Bump Github Actions Runner in CI Agent Containers
Github actions/runner v2.325.0 was released earlier today. Bump the container
images to use the latest version.
2025-06-02 20:47:14 +00:00
Paschalis Mpeis
df712f588c
[github/CODEOWNERS] Add paschalis-mpeis as BOLT reviewer (#141961) 2025-05-30 08:16:05 +01:00
Louis Dionne
4194192aa5
[libc++] Run macOS jobs after the Stage 2 CI (#141816)
Our CI is currently having major difficulties, which causes the Stage 3
CI to basically never succeed. As a result, our macOS CI jobs have not
been running recently. This patch gates the macOS CI jobs on Stage 2
instead of Stage 3 so that they actually run sometimes.
2025-05-29 12:30:08 -04:00
Aiden Grossman
46f90165be
[Github] Bump PR Code Format clang-format version (#141819)
As we have discussed in the past, we should be using the latest version.
This has not been updated in a while.
2025-05-28 12:16:01 -07:00
Aiden Grossman
90232cb833 [MLGO] Add IR2Vec files to pr-subscribes-mlgo
Everything is in the title.
2025-05-28 01:00:36 +00:00
Nikolas Klauser
afd53edefa
[libc++] Bump the docker image hash (#140517)
This updates GCC 15 to the release version to allow us to upgrade to GCC
15.
2025-05-27 10:58:45 +02:00
Aiden Grossman
deedc8a181
[CI][Github] Remove test naming from premerge jobs (#141527)
This patch removes the "test only please ignore" tagline from the
premerge job names. Now that we are looking to sunset the old
infrastructure pretty soon and the new infrastructure is reporting
errors, we want people to actually pay attention to the failures and
report anything erroneous.
2025-05-26 13:19:09 -07:00
Aiden Grossman
5fc3e76ec4
[Github][CI] Make the new premerge system fail jobs on errors
This patch makes the new premerge system report failures when the build
errors out. We were previously not doing this to not notify people on
failures as we were testing out the infra.

This works towards making the new premerge system canonical and the
deprecation of the old system.

A launch announcement on Discourse will accompany this commit.

Reviewers: cmtice, tstellar, joker-eph, Keenuts, dschuff, lnihlen, gburgessiv

Reviewed By: tstellar, joker-eph, Keenuts

Pull Request: https://github.com/llvm/llvm-project/pull/139359
2025-05-26 20:06:25 +00:00
Aiden Grossman
1b78825577
[Github][CI] Stop running premerge checks on main
This patch stops running the premerge checks on the main branch. This is
based on some feedback in
https://discourse.llvm.org/t/rfc-running-premerge-postcommit-through-github-actions/86124.
We want to use buildbot for post commit testing. This should be covered
in the mean time by the current pemerge-monolithic-* bots even though
the configurations are not exactly the same. This also adds a bit of
capacity back to the cluster (although might not in the end when we
start running more substantial postcommit testing through buildbot).

This is primarily in preparation for turning the new premerge system on
as canonical. Without this, we run into warning fatigue issues as
described in the RFC above.

Reviewers: Keenuts, joker-eph, dschuff, cmtice, gburgessiv, lnihlen, tstellar

Reviewed By: Keenuts, joker-eph

Pull Request: https://github.com/llvm/llvm-project/pull/139358
2025-05-26 20:05:44 +00:00
Aiden Grossman
c02e9c8425
[CI][Github] Prune windows container (#141440)
This patch partially prunes the windows container to reduce the image
size, primarily to improve image pull time which is currently a pretty
significant bottleneck in the new premerge due to autoscaling.

This patch removes the following:
- An extra copy of LLVM that is not needed anymore.
- An unneeded perl installation
- Some extra python packages that are specific to buildbot

This overall saves about 4GB on the uncompressed image, or about 20%.

I tested this locally against the premerge pipeline and everything
passes.

There are still several significant areas of opportunity, namely seeing
if we can move away from the 4.8 sdk image to just the
`windowsservercore` image (about 7GB of opportunity), and shrinking the
VS installation (in total about 5GB uncompressed currently opportunity
unknown).
2025-05-25 19:36:09 -07:00
Matt Arsenault
8d374f1f5b
github: Add llvm-reduce to PR autolabeler (#141335) 2025-05-24 15:46:17 +02:00
Aiden Grossman
5c25061f32 [MLGO]{Github] Add MLGO docs page to the MLGO PR subscriber group
This ensures that the MLGO PR subscriber team gets pinged if the document gets
modified which makes sense given it is MLGO specific.
2025-05-16 00:04:46 +00:00