[mlir][spirv-to-llvm] Add conversion for spirv.CopyMemory (#232944)
Convert `spirv.CopyMemory` to `llvm.intr.memcpy`. The byte size copied
is computed from the converted pointee type using the module's data
layout (`DataLayout::closest(op).getTypeSize(...)`) and passed as an
`i64` constant. Runtime arrays (converted to 0-element LLVM arrays) and
scalable types have no fixed static size and fail to match.
Memory-access operands follow the SPIR-V 1.4 specification: when only a
single mask is present it applies to both Target and Source, and when a
second mask is present it applies to Source while the first applies to
Target.
[SPIRV] Lower constant-count entry-block allocas without VLA (#232579)
`alloca T, N` with a constant N in the entry block is a fixed-size
allocation, but it was lowered through the variable-length array path
and required SPV_INTEL_variable_length_array. Rewrite it to `alloca [N x
T]` before pointer type inference so it becomes a plain OpVariable, as
InstCombine already does at -O1+.
[clang] Replace PointerUnion::dyn_cast with llvm::dyn_cast (NFC) (#236317)
PointerUnion::dyn_cast has been soft-deprecated in favor of
llvm::dyn_cast and llvm::dyn_cast_if_present. This patch replaces
PointerUnion::dyn_cast with llvm::dyn_cast in
MatcherContext::Query::get.
Note that IRMatchers.h is only used by TBAAMetadataTest.cpp, where
MatcherContext::Query::Entity is always initialized with nonnull
pointers and never modified afterward.
Assisted-by: Antigravity
[llvm] Remove unused type aliases in .cpp files (NFC) (#236318)
This patch removes unused using and typedef type aliases across .cpp
files under llvm/.
Note that none of the aliased types are spelled out in their
respective .cpp files, so these aliases have no potential use sites in
those files.
Assisted-by: Antigravity
opnsense/suricata: catch EADDRNOTAVAIL and EINVAL for divert
While an interface has no IPv4 address, for instance while rc.linkup
reconfigures it on an attached event, writing a diverted packet back
can fail in three ways that are not caught yet:
o A packet diverted on input carries the name of its receive
interface, cut to seven characters, and the first IPv4 address of
that interface. The kernel looks the interface up by that name and
then by that address. "vlan0.0.6" is cut to "vlan0.0", which matches
no interface, so the address lookup decides and fails with
EADDRNOTAVAIL.
o A packet diverted on output, or on input while its interface had no
IPv4 address (it then carries no address and is written back as an
outbound one), goes to ip_output(), where ARP finds no IPv4 address
on the interface to send the request from and returns EADDRNOTAVAIL.
o In the same path ip_output() has already chosen the interface, but
[12 lines not shown]
french/py-grammalecte-fr: Update to 2.3.0
The bundled bottle 0.12.18 of 1.11.0 imports inspect.getargspec, which
was removed in Python 3.11, so grammalecte-server.py fails to start.
2.3.0 bundles bottle 0.13.4, which no longer uses inspect.getargspec or
the cgi module, and fixes grammalecte-server.py (its shebang and a
sys.version string compare).
www.dicollecte.org no longer serves the distfile (it returns a small
non-zip page); fetch from www.grammalecte.net, which has 2.3.0.
While here, add concurrent to USE_PYTHON (bin/grammalecte-cli.py,
bin/grammalecte-server.py) and set NO_ARCH (pure Python).
Switch to USE_PYTHON=pep517 (the package metadata becomes dist-info).
PR: 299902
[Clang][ABI][X86] Don't return _BitInt as {i64, i64} (#236112)
`_BitInt(N)` for N <= 64 gets returned as `iN`, while for 64 < N < 128
it's returned as `{i64, i64}`, before it becomes `i128` again for N=128.
This changes the ABI code to always use `iN` for N <= 128 (larger types
get passed in memory, not directly).
This doesn't change the actual ABI (returned as two registers, high bits
unspecified), just simplifies how it is represented in IR.
Worth noting that the case of `_BitInt` inside a struct currently
produces different results between Clang and the ABI library. I will
address this in a followup. The argument case will also be handled
separately.
This is a followup to https://github.com/llvm/llvm-project/pull/234872,
which handled the N < 64 case.
[ValueTypes] Implement `getEVTString` in terms of `print` (#236276)
Many calls need to allocate, so add a version that doesn't require this
and use it in places where streams are already used.