14581 Commits

Author SHA1 Message Date
LLVM GN Syncbot
0e936e375e [gn build] Port dc11c0601577 2024-11-11 00:40:10 +00:00
LLVM GN Syncbot
ad2d313f74 [gn build] Port 2c10664afafc 2024-11-10 12:22:25 +00:00
Craig Topper
09b372aa60
[GISel][AArch64][RISCV] Allow G_SEXT_INREG patterns to be imported. (#115576)
SelectionDAG uses VTSDNode to store the extension type. GlobalISel uses
a literal constant operand.

For vectors, SelectionDAG uses a type with the same number of elements
as other operand of the sext_inreg. I assume for GISel we would just use
the scalar size.
2024-11-08 22:26:56 -08:00
LLVM GN Syncbot
cdc1c1ac84 [gn build] Port 8f4401374ca1 2024-11-09 05:26:20 +00:00
Sergei Barannikov
501a583441
[TableGen][SelectionDAG] Remove the implicit DAG node (#115295)
The node was introduced in 59c39dc1 and was intended to allow writing
patterns like this:
`[(set AL, (mul AL, GR8:$src1)), (implicit EFLAGS)]`

However, it does not introduce new functionality because the same
pattern can be equivalently expressed as:
`[(set AL, EFLAGS, (mul AL, GR8:$src1))]`

The latter form is also more flexible as it allows reordering output
operands.

In most places uses of `implicit` were redundant -- removing them didn't
change anything in the generated DAG tables. The only three cases where
it did have effect are in X86InstrArithmetic.td and X86InstrSystem.td --
those were rewritten to use `set` node.

Removing `implicit` from some patterns made them importable by GISel,
hence the change in a test.
2024-11-09 07:25:40 +03:00
LLVM GN Syncbot
f791cfc822 [gn build] Port ff2251543069 2024-11-09 00:19:23 +00:00
LLVM GN Syncbot
4f3bf1c62c [gn build] Port 58a17e1bbc54 2024-11-08 08:27:24 +00:00
LLVM GN Syncbot
1cb119b168 [gn build] Port e189d61924ba 2024-11-07 23:10:25 +00:00
Arthur Eubanks
09fb01a5e5
[gn build] Enable hwasan for aarch64 Android (#115219) 2024-11-07 12:32:42 -08:00
LLVM GN Syncbot
64c921875a [gn build] Port d2aff182d379 2024-11-07 19:25:20 +00:00
LLVM GN Syncbot
e9cb9285ce [gn build] Port cacbe71af7b1 2024-11-07 19:25:19 +00:00
LLVM GN Syncbot
3f4df52315 [gn build] Port 427a5cf105c4 2024-11-07 19:25:18 +00:00
Ryosuke Niwa
ef353b02b0
Introduce a new WebKit checker for a unchecked call arguments (#113708) (#114522)
This PR introduces alpha.webkit.UncheckedCallArgsChecker which detects a
function argument which is a raw reference or a raw pointer to a
CheckedPtr capable object.
2024-11-07 08:34:37 -08:00
Nico Weber
7aa02f9e3f [gn] port c6f3b7bcd0596d3 (libc++ __config_site HAS_NO -> HAS) 2024-11-07 10:25:18 -05:00
Nico Weber
c3e9f48454 [gn] port 4d4024e1edf3 2024-11-07 10:16:13 -05:00
Sergei Barannikov
3bdd71137e
[TableGen][GISel] Extract helper function for constraining operands (#115148)
As a side effect, this fixes COPY_TO_REGCLASS not being constrained
if it is not top-level (the reason for changes in tests).
2024-11-07 07:16:54 +03:00
LLVM GN Syncbot
a33d42ad5f [gn build] Port ff5551cdb07f 2024-11-05 19:08:34 +00:00
Sander de Smalen
ae0ab24862
[TableGen] Fix calculation of Lanemask for RCs with artificial subregs. (#114392)
TableGen builds up a map of "SubRegIdx -> Subclass" where Subclass is
the largest class where all registers have SubRegIdx as a sub-register.
When SubRegIdx (vis-a-vis the sub-register) is artificial it should
still include it in the map. This map is used in various places,
including in the calculation of the Lanemask of a register class, which
otherwise calculates an incorrect lanemask.
2024-11-04 16:10:50 +00:00
Sander de Smalen
9a211fe7e4
[TableGen] Fix concatenation of subreg and artificial subregs (#114391)
When CoveredBySubRegs is true and a sub-register consists of two
parts; a regular subreg and an artificial subreg, then TableGen
should consider only concatenating the non-artificial subregs. 
For example, S0_S1 is a concatenated subreg from D0_D1,
but S0_S1_HI should not be considered.
2024-11-04 15:51:19 +00:00
Jay Foad
f8559751fc
[llvm-project] Fix typo "propogate" (#114795) 2024-11-04 15:33:19 +00:00
abhishek-kaushik22
a58c3d3ac7
Use std::move to avoid copy (#113055) 2024-11-04 07:28:00 -08:00
Sergei Barannikov
eeb987f6f3
[MC] Make generated MCInstPrinter::getMnemonic const (NFC) (#114682)
The value returned from the function depends only on the instruction opcode.

As a drive-by, change the type of the argument to const-reference.
2024-11-03 20:37:26 +03:00
LLVM GN Syncbot
a6fc677f10 [gn build] Port ef2a104c94a8 2024-11-02 01:30:09 +00:00
LLVM GN Syncbot
9adf50c179 [gn build] Port c72a751dabff 2024-11-02 01:30:09 +00:00
LLVM GN Syncbot
cecb3c4ad7 [gn build] Port 7ec26b23f27f 2024-11-02 01:30:08 +00:00
Nico Weber
decf88d3e9 [gn] port eeee5a44bbf2 (clang-sycl-linker)
Also port follow-up 0d499f9043fed14.
2024-11-01 21:28:48 -04:00
Phoebe Wang
c72a751dab
[X86][AMX] Support AMX-TRANSPOSE (#113532)
Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368
2024-11-01 16:45:03 +08:00
Ryosuke Niwa
61a6439f35
Introduce a new WebKit checker for a unchecked local variable (#113708)
This PR introduces alpha.webkit.UncheckedLocalVarsChecker which detects
a raw reference or a raw pointer local, static, or global variable to a
CheckedPtr capable object without a guardian variable in an outer scope.
2024-10-31 23:53:07 -07:00
LLVM GN Syncbot
78a98c7aa8 [gn build] Port e67e03a22c27 2024-10-31 10:11:28 +00:00
Fangrui Song
9bb5af8a42 [TableGen] Replace StringRef::slice with substr. NFC 2024-10-30 22:27:12 -07:00
Adam Yang
948249d804
Revert "[DXIL] Add GroupMemoryBarrierWithGroupSync intrinsic" (#114322)
Reverts llvm/llvm-project#111884
2024-10-30 20:44:54 -07:00
LLVM GN Syncbot
ccdfd1a182 [gn build] Port 8127162427c5 2024-10-31 02:27:09 +00:00
LLVM GN Syncbot
d67f2bd45d [gn build] Port 84b7bcfcac02 2024-10-31 00:17:29 +00:00
Nico Weber
36b79156db [gn] port 508263824f4ef (BuiltinsX86.td) 2024-10-30 19:59:48 -04:00
Brox Chen
6f973fd4ab
[AMDGPU][test] fix the error case in update_mc_test_check script (#112731)
update_mc_test_check script handle the "error case testline" wrong in
three cases:

1. when user select "--llvm-mc-binary" with a path, the script does not
add "not" on top of the "--llvm-mc-binary" and thus getting non-zero
exit code and failed.
2. When "not" is presented in runline while not all testlines are
expected to fail, the script need to check if the "not" is needed when
it execute llvm-mc line by line. Otherwise the script will fail on
testline which is passing.
3. When there are multiple runlines, the error checkline need to use
correct line offset for "[[LINE-X]]"

This patch solve these three issues
2024-10-30 09:02:40 -04:00
Jessica Clarke
9467645547
[CodeGen] Rename MVT::iPTRAny to MVT::pAny
Whilst in upstream LLVM iPTRAny is only ever an integer, essentially an
alias for iPTR, this is not true in CHERI LLVM, where it gets used to
mean "iPTR or cPTR", i.e. either an integer address or a capability
(with cPTR and cN being the capability equivalents of iPTR and iN).
Moreover, iPTRAny is already not itself regarded as an integer (calling
isInteger() will give false), so the "i" prefix is misleading, and it
stands out as different from all the other xAny that have a single
letter prefix denoting their type.

Thus, rename it to pAny, reflecting that it is an overloaded pointer
type, which could end up being specialised to an integer type, but does
not have to be.

This has been verified to have no effect on the generated files for LLVM
itself or any in-tree target beyond the replacement of the identifier
iPTRAny with pAny in GenVT.inc.

Reviewers: arsenm

Reviewed By: arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/113733
2024-10-30 03:27:48 +00:00
Jessica Clarke
e8b7f53fa4
[TableGen] Remove a pointless check for iPTRAny
We've already called EnforceInteger on Types[0], and iPTRAny isn't
regarded as an integer type (note that TableGen special-cases iPTR here
to include that, though), so we cannot possibly still have an iPTRAny by
this point. Delete the check, and let getFixedSizeInBits catch it along
with all the other overloaded types if that ever becomes false. Also
document why we have this check whilst here.

Reviewers: arsenm

Reviewed By: arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/113732
2024-10-30 03:19:53 +00:00
Jessica Clarke
ef455e6b16
[TableGen] Replace all lingering uses of getName with getEnumName
The former is a wrapper for the latter with two differences: Other is
mapped to "UNKNOWN" (rather than "MVT::Other"), and iPTR(Any) are mapped
to "TLI.getPointerTy()" rather than "MVT::iPTR(Any)".

The only uses are in FastISelMap::printFunctionDefinitions. Most of
these uses are just a form of name mangling to ensure uniqueness, so the
actual string isn't important (and, in the case of MVT::iPTR(Any), were
both to be used, they would clash). Two uses are for a case statement,
which requires the expression to be a constant (of the right type), but
neither UNKNOWN nor TLI.getPointerTy() are constants, so would not work
there. The remaining uses are where an expression is needed, so UNKNOWN
similarly doesn't work, though TLI.getPointerTy() could in this case.
However, neither iPTR nor iPTRAny are supposed to make it this far
through TableGen, and should instead have been replaced with concrete
types, so this case should not be hit. Moreover, for almost all of these
uses, the name is passed to getLegalCName, which will strip an MVT::
prefix but will leave TLI.getPointerTy() unchanged, which is not a valid
C identifier, nor component thereof.

Thus, delete this unnecessary, and mostly-broken, wrapper and just use
the underlying getEnumName. This has been verified to have no effect on
the generated files for any in-tree target, including experimental ones.

Reviewers: arsenm

Reviewed By: arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/113731
2024-10-30 03:12:23 +00:00
A. Jiang
63eb40eeb1
[libc++] Deprecate and remove meaningless <cxxx> headers (#111615)
This PR deprecates `<ccomplex>`, `<cstdbool>`, `<ctgmath>`, and
`<ciso646>` in C++17 and "removes" them in C++20 by special deprecation
warnings.

`<cstdalign>` is previously missing. This PR also tries to add them, and
then deprecates and "removes" `<cstdalign>`.

Papers:
- https://wg21.link/P0063R3
- https://wg21.link/P0619R4

Closes #99985.

---------

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2024-10-30 09:49:26 +08:00
Jerry Sun
cdacc9b5c7
[TableGen] [NFC] Refine TableGen code to comply with clang-tidy checks (#113318)
Code cleanups for TableGen files, changes includes function names,
variable names and unused imports.

---------

Co-authored-by: Matt Arsenault <Matthew.Arsenault@amd.com>
2024-10-29 11:10:54 -07:00
LLVM GN Syncbot
b0dd368d57 [gn build] Port b510cdb895b9 2024-10-29 18:01:23 +00:00
Brox Chen
528e975ac4
[AMDGPU][test]added unique and sort options for update_mc_test_check script (#111769)
add a unique and a sort option to the update_mc_test_check script.

These mc asm/dasm files are usually large in number of lines, and these
lines are mostly similar to each other. These options can be useful when
maintainer is merging or resolving conflicts by making the file
identifical

Also fixed a small issue in asm/dasm such that the auto generated header
line is
1. asm using ";" instead of "//" as comment marker
2. dasm using ";" instead of "#" as comment marker
2024-10-29 13:48:43 -04:00
Adam Yang
9a5b3a1bbc
[DXIL] Add GroupMemoryBarrierWithGroupSync intrinsic (#111884)
fixes #112974
partially fixes #70103

### Changes
- Added new tablegen based way of lowering dx intrinsics to DXIL ops.
- Added int_dx_group_memory_barrier_with_group_sync intrinsic in
IntrinsicsDirectX.td
- Added expansion for int_dx_group_memory_barrier_with_group_sync in
DXILIntrinsicExpansion.cpp`
- Added DXIL backend test case

### Related PRs
* [[clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic
#111883](https://github.com/llvm/llvm-project/pull/111883)
* [[SPIRV] Add GroupMemoryBarrierWithGroupSync intrinsic
#111888](https://github.com/llvm/llvm-project/pull/111888)
2024-10-29 10:17:35 -07:00
LLVM GN Syncbot
af44976cad [gn build] Port 6128ff663076 2024-10-29 15:18:09 +00:00
LLVM GN Syncbot
f906d765ba [gn build] Port 5ea694816b56 2024-10-29 15:18:08 +00:00
Nico Weber
d43e4ce77d Revert "[gn] port b1be21394e9c"
b1be21394e9c was reverted in 3ac75ee8ec.

This reverts commit 18f4b7e4a862c11816e62cc72fb2a4ca8fac1987, as well
as follow-ups a69d2a18d207947a25838dd01d2116bee384b75b and
4a6b56960f445d111adc9aef799acad8c6ca41f0.
2024-10-29 11:17:11 -04:00
Jerry Sun
00ca2071e0
[TableGen] [NFC] Remove unused includes in TableGen BE (#113725)
split PR as requested from
https://github.com/llvm/llvm-project/pull/113318.

Removes unused imports in TableGen BE
2024-10-28 20:26:10 -07:00
LLVM GN Syncbot
1164bd7747 [gn build] Port e146c1867e8d 2024-10-28 11:56:44 +00:00
LLVM GN Syncbot
2a4bab3fac [gn build] Port cfde4fbccf5d 2024-10-28 11:56:43 +00:00
LLVM GN Syncbot
595ec4e4be [gn build] Port 5aa1275d03b6 2024-10-28 11:56:42 +00:00