13737 Commits

Author SHA1 Message Date
Nico Weber
4ca0e00af5 [gn] Fix typo in SPIRVTests dummy target comment 2024-02-02 15:56:05 -05:00
Nico Weber
7f828c4a2b [gn] Add dummy build file for SPIRVTests
sync_source_lists_from_cmake.py checks that every unittest in CMake
also exists in the GN build. 7b08b4360b48 added SPRIVTests, but the GN
build doesn't include the SPIRV target. So add a dummy target for this
to placate the check.

See also VETests in the gn build, which has the same setup.
2024-02-02 15:53:49 -05:00
Tom Stellard
06c14c03da Revert "[workflows] Split pr-code-format into two parts to make it more secure (#78216)"
This reverts commit bc06cd5cbcfc22dd976f6742d10bc934e1353b8a.

This caused the job to fail for PRs which still had an older version
of code-format-helper.py in their tree.
2024-02-02 12:03:38 -08:00
Tom Stellard
bc06cd5cbc
[workflows] Split pr-code-format into two parts to make it more secure (#78216)
Actions triggered by pull_request_target events have access to all
repository secrets, so it is unsafe to use them when executing untrusted
code. The pr-code-format workflow does not execute any untrusted code,
but it passes untrused input into clang-format. An attacker could use
this to exploit a flaw in clang-format and potentially gain access to
the repository secrets.

By splitting the workflow, we can use the pull_request target which is
more secure and isolate the issue write permissions in a separate job.
The pull_request target also makes it easier to test changes to the
code-format-helepr.py script, because the version of the script from the
pull request will be used rather than the version of the script from
main.

Fixes #77142
2024-02-02 11:31:23 -08:00
LLVM GN Syncbot
3050311655 [gn build] Port 67eee4a02979 2024-02-02 16:14:19 +00:00
Nico Weber
ff31940370 [gn] port ecb5a1b0e236 2024-02-01 18:52:58 -05:00
David Spickett
96a3d05ed9 [GitHub][workflows] Reflow some text in buildbot info PR comment
When the markdown link renders the line gets a lot shorter.
2024-02-01 10:44:25 +00:00
Kazu Hirata
39fa304866 [llvm] Use StringRef::starts_with (NFC) 2024-01-31 23:54:07 -08:00
Pierre van Houtryve
7ec996d4c5
[GlobalISel][TableGen] Support Intrinsics in MIR Patterns (#79278) 2024-02-01 08:53:32 +01:00
Shengchen Kan
c82a645ef2 [X86][NFC] Simplify the code for memory fold 2024-02-01 13:43:25 +08:00
LLVM GN Syncbot
19a10c13e5 [gn build] Port 147d7a64f849 2024-02-01 05:06:39 +00:00
LLVM GN Syncbot
742f88e9c7 [gn build] Port d347c564299e 2024-01-31 20:27:06 +00:00
Carlos Galvez
4cb13f2d23
[clang-tidy] Remove cert-dcl21-cpp check (#80181)
Deprecated since clang-tidy 17. The rule DCL21-CPP has been removed from
the CERT guidelines, so it does not make sense to keep the check.

Fixes #42788

Co-authored-by: Carlos Gálvez <carlos.galvez@zenseact.com>
2024-01-31 20:35:28 +01:00
LLVM GN Syncbot
35a008994a [gn build] Port 57c66b35a885 2024-01-31 17:41:16 +00:00
LLVM GN Syncbot
0cd83486c0 [gn build] Port 8d1b1c9b97de 2024-01-31 16:07:23 +00:00
David Spickett
44ba4c732b
[GitHub][workflows] Add buildbot information comment to first merged PR from a new contributor (#78292)
This change adds a comment to the first PR from a new contributor that
is merged, which tells them what to expect post merge from the build
bots.

How they will be notified, where to ask questions, that you're more
likely to be reverted than in other projects, etc. The information
overlaps with, and links to
https://llvm.org/docs/MyFirstTypoFix.html#myfirsttypofix-issues-after-landing-your-pr.
So that users who simply read the email are still aware, and know where
to follow up if they do get reports.

To do this, I have added a hidden HTML comment to the new contributor
greeting comment. This workflow will look for that to tell if the author
of the PR was a new contributor at the time they opened the merge. It
has to be done this way because as soon as the PR is merged, they are by
GitHub's definition no longer a new contributor and I suspect that their
author association will be "contributor" instead.

I cannot 100% confirm that without a whole lot of effort and probably
breaking GitHub's terms of service, but it's fairly cheap to work around
anyway. It seems rare / almost impossible to reopen a PR in llvm at
least, but in case it does happen the buildbot info comment has its own
hidden HTML comment. If we find this we will not post another copy of
the same information.
2024-01-31 10:11:24 +00:00
LLVM GN Syncbot
aa88a09fbc [gn build] Port d8b61d716899 2024-01-30 20:51:55 +00:00
Nico Weber
3a085e98ac [gn] use write_cmake_config() for __assertion_handler 2024-01-30 10:11:50 -05:00
Nico Weber
0d965080b4 [gn] port 7162fd750ee5 2024-01-30 10:04:33 -05:00
Jay Foad
0e17684cf5
[AMDGPU] Speed up SIRegisterInfo::getReservedRegs (#79844)
reserveRegisterTuples is slow because it uses MCRegAliasIterator and
hence ends up reserving the same aliased registers many times. This
patch changes getReservedRegs not to use it for reserving SGPRs, VGPRs
and AGPRs. Instead it iterates through base register classes, which
should come closer to reserving each register once only.

Overall this speeds up the time to run check-llvm-codegen-amdgpu in my
Release build from 18.4 seconds to 16.9 seconds (all timings +/- 0.2).
2024-01-30 11:32:16 +00:00
XinWang10
1a219e989f
[X86] Support EVEX compression from MOVBErr to BSWAP (#79775)
APX promoted MOVBE instructions were supported in #77431. The reg2reg
variants of MOVBE are newly introduced by APX and can be optimized to
BSWAP instruction when the 2 register operands are same.

This patch adds manual entries for MOVBErr instructions when we do ndd
to non-ndd compression #77731.
RFC:
https://discourse.llvm.org/t/rfc-design-for-apx-feature-egpr-and-ndd-support/73031/4
2024-01-30 16:57:51 +08:00
Justin Bogner
db6bf92123
[DirectX] Rename DXILOperationCommon.h to DXILABI.h. NFC
This is a good place to put all of the ABI-sensitive DXIL values that
we'll need in both reading and writing contexts.

Pull Request: https://github.com/llvm/llvm-project/pull/78224
2024-01-29 09:19:47 -08:00
Michael Liao
70f5b22050 [TableGen][AsmMatcher] Fix the range check on 'MatchClassKind'
- When selecting the minimal type for 'MatchClassKind' during the
  emission of 'MatchEntry' and 'OperandMatchEntry', two pre-defined
  kinds 'InvalidMatchClass' and 'OptionalMatchClass' are not taken into
  account.
2024-01-29 11:25:50 -05:00
Jason Eckhardt
d93f850c6f
[TableGen] Extend OPC_ExtractField/OPC_CheckField start value widths. (#79723)
Both OPC_ExtractField and OPC_CheckField are currently defined to take
an unsigned 8-bit start value. On some architectures with long
instruction words, this value can silently overflow, resulting in a bad
decoder table.

This patch changes each to take a ULE128B-encoded start value instead.
Additionally, a range assertion is added for the 8-bit length to
prominently notify a user in case that field ever overflows.

This problem isn't currently exposed upstream since all in-tree targets
use small instruction words (i.e., bitwidth <= 64 bits). It does show up
in at least one downstream target with instructions > 64 bits long.

Co-authored-by: Jason Eckhardt <jeckhardt@nvidia.com>
2024-01-29 09:22:22 -05:00
Shengchen Kan
7c3ee7cbe6
[X86][tablgen] Fix the broadcast tables (#79675) 2024-01-28 09:06:27 +08:00
Aiden Grossman
1f13203029 [MLGO] Bump mlgo-utils version to 19.0.0
This patch bumps the mlgo-utils version to 19.0.0 as 18.0.0 got branched
recently.
2024-01-27 00:24:28 -08:00
Aiden Grossman
2b25e40a88 [MLGO] Switch test to invoke pytype through python
Currently this test is assuming that ~/.local/bin (or wherever the
Python binaries are installed to) is on the path. This is not a valid
assumption in most cases, and it also means we might not find the
version of pytype associated with the Python interpreter being used to
test LLVM, which could create some inconsistencies. This patch fixes
that by invoking pytype through the Python interpreter passed to lit.
2024-01-26 21:46:21 +00:00
Aiden Grossman
e4afffbe8c
[MLGO] Add pytype test (#79558)
This patch adds a pytype test to the mlgo-utils lit test suite to
prevent regressions in typing while we wait to setup precommit CI for
this specific project.

This is somewhat hacky, but is a temporary fix and will be pulled out
soonish. It also should only impact the ML buildbots as they are the
only ones that should have `pytype` installed.
2024-01-26 12:24:15 -08:00
LLVM GN Syncbot
8f98c2c3b6 [gn build] Port 9058503d2690 2024-01-26 15:33:35 +00:00
XinWang10
6d0080b5de
[X86] Support promoted ENQCMD, KEYLOCKER and USERMSR (#77293)
R16-R31 was added into GPRs in
https://github.com/llvm/llvm-project/pull/70958,
This patch supports the promoted ENQCMD, KEYLOCKER and USER-MSR
instructions in EVEX space.

RFC:
https://discourse.llvm.org/t/rfc-design-for-apx-feature-egpr-and-ndd-support/73031/4
2024-01-26 14:24:43 +08:00
Tom Stellard
e99edf6bcb
[workflows] Drop the intermediate /branch comment for release workflow (#79481)
We used to support a /branch comment to specify a branch with commits to
backport to the release branch. However, now that we can use pull
requests this is not needed.

This also simplifies the process, because now the cherry-pick job can
create the pull request directly instead of having it split across two
separate jobs.
2024-01-25 13:11:09 -08:00
Nico Weber
016b7e8bf4 [gn] port 184ca39529a9 2024-01-25 12:03:13 -05:00
Nico Weber
184ca39529
[llvm] Move CodeGenTypes library to its own directory (#79444)
Finally addresses https://reviews.llvm.org/D148769#4311232 :)

No behavior change.
2024-01-25 12:01:31 -05:00
Nico Weber
45cc2a19ca [gn] port 12a8bc0 more
The test reaches into internal headers. Make sure generated files
are ready for that.

(This is the only place. If there were more, we should use public_deps
instead.)
2024-01-25 08:48:22 -05:00
Nico Weber
71c52e4236 [gn build] Port 3fdb431b6369 2024-01-25 08:41:44 -05:00
Nico Weber
e5e1a89310 [gn] port 12a8bc09ca4f 2024-01-25 07:58:01 -05:00
Wang Pengcheng
41fe98a6e7
[TableGen] Use MapVector to remove non-determinism
This fixes found non-determinism when `LLVM_REVERSE_ITERATION`
option is `ON`.

Fixes #79420.

Reviewers: ilovepi, MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/79411
2024-01-25 16:16:19 +08:00
Wang Pengcheng
664a0faac4
[TableGen] Add predicates for immediates comparison (#76004)
These predicates can be used to represent `<`, `<=`, `>`, `>=`.

And a predicate for `in range` is added.
2024-01-25 15:17:31 +08:00
LLVM GN Syncbot
45950f6e27 [gn build] Port bddeef54cb66 2024-01-24 23:19:01 +00:00
Nico Weber
609695b23e [gn] port 32f7922646d5 (LLVMOptDriver) 2024-01-24 14:03:33 -05:00
Nico Weber
4a9a1d83be [gn build] port 4a582845597e (tablegen'd clang builtins) 2024-01-24 12:43:35 -05:00
Nikita Popov
56444d5687
Remove fork handling from release issue workflow (#79310)
This is currently broken, because the check is performed on the wrong
repository. repo here is llvm/llvm-project, which is not a fork (so this
will always trigger), then we'll push a new branch to
llvmbot/llvm-project, and then again set the wrong owner, so we'll look
for the branch in llvm/llvm-project rather than llvmbot/llvm-project.

Rather than fixing this, I'm removing the code entirely, as it shouldn't
be needed anymore (llvmbot/llvm-project is a fork of llvm/llvm-project).
2024-01-24 17:39:10 +01:00
Nikita Popov
416b079336
Fix release issue workflow (#79268)
Remove the `--phab-token` argument (which currently eats the subsequent
"auto" as the token no longer exists) and related code.

I think this will fix the workflow failure in
https://github.com/llvm/llvm-project/issues/79253#issuecomment-1907679229.
2024-01-24 11:23:28 +01:00
LLVM GN Syncbot
bc182ea7c2 [gn build] Port 7251243315ef 2024-01-24 06:13:57 +00:00
Tom Stellard
987087df90 Bump trunk version to 19.0.0git 2024-01-23 19:00:11 -08:00
Nico Weber
ecde13b1a8 [gn build] port 7e50f006f7f6 2024-01-23 21:14:36 -05:00
Tom Stellard
f6ced3579a
[CMake][Release] Add option for enabling PGO to release cache file. (#78823)
The option is LLVM_RELEASE_ENABLE_PGO and it's turned on by default.

---------

Co-authored-by: Petr Hosek <phosek@google.com>
2024-01-23 11:32:37 -08:00
Nico Weber
3428c28b3d [gn] port 5176df55d3a 2024-01-23 12:41:51 -05:00
LLVM GN Syncbot
c173a5bdc4 [gn build] Port 40bdfd39e394 2024-01-23 14:52:33 +00:00
Nico Weber
e60d780f4a [gn] port 3ab8d2aac7bc
3ab8d2aac7bc relanded in 3112578597c031, so reland this too.

Might want to set this to True (and add a few source files to
builtins) at some point, but for now heal the bots.
2024-01-23 07:42:40 -05:00