14829 Commits

Author SHA1 Message Date
Nico Weber
d0a89e7179 [gn] fix mistake in d7fb4a275c98f 2025-01-22 10:19:30 -05:00
Nico Weber
4170d6123c [gn] port 6aeffcdb9130 2025-01-22 10:16:53 -05:00
SivanShani-Arm
d7fb4a275c
[LLVM][Clang][AArch64] Implement AArch64 build attributes (#118771)
- Added support for AArch64-specific build attributes.
- Print AArch64 build attributes to assembly.
- Parse AArch64 build attributes from assembly.
- Emit AArch64 build attributes to ELF.

Specification:
 https://github.com/ARM-software/abi-aa/pull/230
2025-01-22 14:23:46 +00:00
Marc Auberer
5136c6d9d2
[Tools][Docker] Update Dockerfiles and Docker guide (#123841)
Fixes #123669

- Update Dockerfiles to work with the LLVM trunk
- Adapt Documentation accordingly
- Fix duplicate `-c` flag
2025-01-22 13:53:23 +01:00
Sergei Barannikov
6aeffcdb91
[TableGen] Add a backend generating SDNode descriptions (#123002)
This patch adds a simplistic backend that gathers all target-specific
SelectionDAG nodes and emits descriptions for most of them.

This includes generating node enumeration, node names, and information
about node "prototype" that can be used to verify that a node is valid.

The patch also extends SDNode by adding target-specific flags, which are
also included in the generated tables.

Part of #119709,
[RFC](https://discourse.llvm.org/t/rfc-tablegen-erating-sdnode-descriptions/83627).

Pull Request: https://github.com/llvm/llvm-project/pull/123002
2025-01-22 09:01:08 +03:00
Finn Plummer
011b618644
[DXIL] Define and generate DXILAttribute and DXILProperty (#117072)
- Redefines `DXILAttribute` to denote a function attribute, compatible
to how it was define in DXC/LLVM 3.7
- Fix how `DXILAttribute` is emitted to be a struct of set attributes
instead of an "or" of the enums
- Implement the lowering of `DXILAttribute` to LLVM function attributes
in `DXILOpBuilder.cpp`. A custom mapping is defined.
- Audit all current ops to specify the correct attributes consistent
with DXC. This is done here to allow for testing.
- Update testcases in `llvm/test/CodeGen/DirectX` of all ops with
attributes to match that attributes are set
- Update testcases of ops that had previously incorrectly set attributes
to check there is no attributes set
- Defines `DXILProperty` to denote the other type of attributes from DXC
used to query properties.
- Emit `DXILProperty` as a struct of set attributes.
- Updates `DXIL.td` to specify applicable `DXILProperty`s on ops

Note: `DXILProperty` was referred to as 'queryable attributes' in design
discussion. Changed to property to allow for better expression in
`DXIL.td`

Resolves #114461
Resolves #115912
2025-01-21 17:33:45 -08:00
Kazu Hirata
1714facf4f
[TableGen] Avoid repeated map lookups (NFC) (#123699) 2025-01-21 16:23:23 +08:00
Jason Eckhardt
271b3383d7
[TableGen][NFC] Factor early-out range check. (#123645)
Combine the EarlyOut and IsContiguous range check.
Also avoid "comparison is always false" warnings in emitted code when
the lower-bound check is against 0.
2025-01-20 19:13:31 -06:00
Kazu Hirata
818d6e5665
[TableGen] Avoid repeated hash lookups (NFC) (#123562) 2025-01-20 10:16:20 -08:00
LLVM GN Syncbot
a034555097 [gn build] Port 6d12b954a7df 2025-01-20 03:16:21 +00:00
Craig Topper
0e4a10dff8 [MC] Add MCRegister::isPhysical. NFC 2025-01-18 22:28:37 -08:00
Craig Topper
bc386a8268
[TableGen] Replace some uses of make_range with methods that already return a range. NFC (#123453) 2025-01-18 08:37:25 -08:00
Craig Topper
2a4c4b554b
[TableGen] Use const getter to implement non-const getter instead of the other way around. NFC (#123452)
It's better to cast away constness on the reference being returned than
to cast away constness on the this pointer.
2025-01-18 08:35:59 -08:00
Craig Topper
c3aa86c9de [TableGen] const-correct a couple CodeGenSchedule methods. NFC 2025-01-17 22:55:20 -08:00
Jie Fu
d79e3af8ad [TableGen] Fix unused-variable warnings in CodeGenSchedule.cpp (NFC)
/llvm-project/llvm/utils/TableGen/Common/CodeGenSchedule.cpp:1704:32:
 error: unused variable 'Seq' [-Werror,-Wunused-variable]
    SmallVectorImpl<unsigned> &Seq =
                               ^
/llvm-project/llvm/utils/TableGen/Common/CodeGenSchedule.cpp:1713:32:
 error: unused variable 'Seq' [-Werror,-Wunused-variable]
    SmallVectorImpl<unsigned> &Seq =
                               ^
2 errors generated.
2025-01-18 14:48:55 +08:00
Craig Topper
6628b5934d
[TableGen] Use a range-based for loop. NFC (#123443) 2025-01-17 21:41:52 -08:00
Craig Topper
23746c2f6d
[TableGen] Use vector constructor instead of calling append or emplace_back on an empty vector. NFC (#123442) 2025-01-17 21:41:34 -08:00
Craig Topper
9cd12b5652
[TableGen] Inline a helper function that didn't seem necessary. NFC (#123440)
The function called find_if and converted the iterator to an index.
The caller then had to check the index being non-zero to know if the
find succeeded.

Seems better to just do the find and distance in the caller.
2025-01-17 21:41:04 -08:00
LLVM GN Syncbot
18eec97f09 [gn build] Port ae932becb2c9 2025-01-17 22:08:15 +00:00
LLVM GN Syncbot
580ba2eed2 [gn build] Port 6b048aeaf837 2025-01-17 20:01:12 +00:00
LLVM GN Syncbot
a807b2feb8 [gn build] Port 128e2e446e90 2025-01-17 20:01:11 +00:00
Fangrui Song
414980d061
[CMake] Remove HAVE_SYS_RESOURCE_H/HAVE_SETRLIMIT/HAVE_GETRLIMIT
Only used by Unix/Program.inc and seem always available.

Pull Request: https://github.com/llvm/llvm-project/pull/123288
2025-01-16 22:44:54 -08:00
Fangrui Song
219beb7aca [CMake] Remove HAVE_SYS_IOCTL_H 2025-01-16 21:52:01 -08:00
Fangrui Song
86a81d424c [CMake] Remove HAVE_TERMIOS_H
The code path has been dead since 2019.
See a3eb3d3d92d037fe3c9deaad87f6fc42fe9ea766
2025-01-16 21:48:27 -08:00
Fangrui Song
f999b11e68
[CMake] Remove some unneeded HAVE_*_H
Pull Request: https://github.com/llvm/llvm-project/pull/123282
2025-01-16 21:37:24 -08:00
LLVM GN Syncbot
8942d5ee6f [gn build] Port e902c6960cff 2025-01-16 23:27:05 +00:00
Evgenii Kudriashov
a242880371
[TableGen][GlobalISel] Reorder atomic predicate to preserve the order (#121806)
Since there are no opcodes for atomic loads and stores comparing to
SelectionDAG, we add `CheckMMOIsNonAtomic` predicate immediately after
the opcode predicate to make a logical combination of them. Otherwise
when `IPM_AtomicOrderingMMO` is inserted after `IPM_GenericPredicate`,
the patterns without predicates get a higher priority as
`IPM_AtomicOrderingMMO` has higher priority than `IPM_GenericPredicate`.

This is important to preserve an order of aligned/unaligned patterns on
X86 because aligned memory operations have an additional alignment
predicate and should be checked first according to their placement in td
file.

Closes #121446
2025-01-16 17:06:21 +01:00
LLVM GN Syncbot
da5ec78f2a [gn build] Port 8fb29ba287d7 2025-01-16 15:05:44 +00:00
LLVM GN Syncbot
25e5eb17b1 [gn build] Port 2c75bda42605 2025-01-16 15:05:43 +00:00
Nico Weber
b1cef93917 [gn] port bf17016a92bc (-gen-clang-diags-enums) 2025-01-16 09:31:35 -05:00
Jay Foad
4e8c9d2813
[TableGen] Use std::pair instead of std::make_pair. NFC. (#123174)
Also use brace initialization and emplace to avoid explicitly 
constructing std::pair, and the same for std::tuple.
2025-01-16 13:20:41 +00:00
Kazu Hirata
f30ff0b1a9
[TableGen] Avoid repeated hash lookups (NFC) (#123161) 2025-01-15 23:07:12 -08:00
Fangrui Song
1e53f9523d
[CMake] Remove some always-true HAVE_XXX_H
These are unneeded even on AIX, PURE_WINDOWS, and ZOS (per #104706)

* HAVE_ERRNO_H: introduced by 1a93330ffa2ae2aa0b49461f05e6f0d51e8443f8 (2009) but unneeded.
  The guarded ABI is unconditionally used by lldb.
* HAVE_FCNTL_H
* HAVE_FENV_H
* HAVE_SYS_STAT_H

Pull Request: https://github.com/llvm/llvm-project/pull/123087
2025-01-15 09:53:21 -08:00
abhishek-kaushik22
943b212d56
[TableGen] Use std::move to avoid copy (#123088) 2025-01-15 22:50:00 +05:30
LLVM GN Syncbot
d0a36423c1 [gn build] Port 3986cffe8112 2025-01-15 16:09:28 +00:00
Kazu Hirata
618ac908db
[TableGen] Avoid repeated hash lookups (NFC) (#123018) 2025-01-15 07:57:30 -08:00
LLVM GN Syncbot
ea4a87957f [gn build] Port 42595bdaefb6 2025-01-14 09:26:18 +00:00
Craig Topper
726cfc67b6
[RISCV] Don't convert virtual register Register to MCRegister in isCompressibleInst. (#122843)
Calling MCRegisterClass::contains with a Register does an implicit
conversion from Register to MCRegister. I think MCRegister is only
intended to be used for physical registers. We should protect this
implicit conversion by checking for physical registers first.

While I was here I removed some unnecessary parentheses from the output.
2025-01-13 23:36:09 -08:00
Craig Topper
9844badfca
[X86] Use loaded/stored element size when parsing/printing gather/scatter pointer size in Intel syntax. (#122530)
This matches binutils.
2025-01-13 10:36:40 -08:00
LLVM GN Syncbot
7059178bd3 [gn build] Port cedb44af53f1 2025-01-13 15:56:33 +00:00
LLVM GN Syncbot
051cd36f82 [gn build] Port b5ba4f06db2e 2025-01-13 15:56:32 +00:00
Momchil Velikov
5315f3f8cb
Handle leading underscores in update_cc_test_checks.py (#121800)
For some ABIs `update_cc_test_checks.py` is unable to generate tests
because of the mismatch between the mangled function names reported by
clang's `-asd-dump` and the function names in LLVM IR.

This patch fixes it by striping the leading underscore from the mangled
name for global functions if the data layout string says they have one.
2025-01-13 11:24:05 +00:00
Kazu Hirata
76af93fbea Partially revert "[TableGen] Avoid repeated hash lookups (NFC) (#122586)"
This partially reverts commit 07ff786e39e2190449998d3af1000454dee501be.

The hunk being reverted in this patch seems to break:

  tools/llvm-gsymutil/ARM_AArch64/macho-merged-funcs-dwarf.yaml

under LLVM_ENABLE_EXPENSIVE_CHECKS.
2025-01-12 23:50:58 -08:00
LLVM GN Syncbot
7532958355 [gn build] Port 8ebc35f8d041 2025-01-12 10:05:24 +00:00
Kazu Hirata
07ff786e39
[TableGen] Avoid repeated hash lookups (NFC) (#122586) 2025-01-11 13:15:30 -08:00
LLVM GN Syncbot
0f242897ce [gn build] Port 2e5c29828196 2025-01-10 19:52:53 +00:00
LLVM GN Syncbot
513fa28901 [gn build] Port c664a7f97503 2025-01-10 16:05:01 +00:00
LLVM GN Syncbot
0e1c5bfac8 [gn build] Port 69b54c1a05c0 2025-01-09 18:02:43 +00:00
Justin Bogner
cba9bd5cb0
[DirectX] Implement the resource.load.rawbuffer intrinsic (#121012)
This introduces `@llvm.dx.resource.load.rawbuffer` and generalizes the
buffer load docs under DirectX/DXILResources.

This resolves the "load" parts of #106188
2025-01-08 16:56:05 -08:00
Alexandros Lamprineas
8e65940161
[FMV][AArch64] Simplify version selection according to ACLE. (#121921)
Currently, the more features a version has, the higher its priority is.
We are changing ACLE https://github.com/ARM-software/acle/pull/370 as
follows:

"Among any two versions, the higher priority version is determined by
 identifying the highest priority feature that is specified in exactly
 one of the versions, and selecting that version."
2025-01-08 18:59:07 +00:00