[ARM] Disable hardware loops without thumbv8.1-m.main instructions. (#243831)
Using +lob with thumbv8-m is not a valid combination, but the hardware
loop pass would attempt to insert instructions that were not selectable.
Make sure we don't try to generate hardware loops without thumbv8.1m
instructions.
Fixes #243545
[lldb][test] Remove leftover benchmark test infrastructure (#243494)
The old benchmark infrastructure were removed in 7e5fe3ec5aed (#108629).
but some supporting pieces were left behind:
* lldbbench.py which has has no users.
* The dotest '-y' option, whose handling was already removed in
923fdbadae3c but whose argparse definition remained.
[Hexagon] Use unsigned compare for unsigned hwloop distance guard (#236824)
The hardware-loop pass guards the trip count of an unsigned less-than or
less-or-equal loop with a signed comparison of the distance register. A
distance of 0xffffffff, such as a bound of UINT32_MAX, is seen as -1, so
the count is clamped to 1 and the loop exits after its first iteration.
Use C2_cmpgtui for unsigned CmpLess so the distance is compared as an
unsigned value. Signed loops and CmpGreater keep C2_cmpgti.
Signed-off-by: Kushal Pal <kushpal at qti.qualcomm.com>
[CIR] Add bytecode encodings for types other than records (#243865)
Without a bytecode encoding, MLIR stores a dialect type as its printed
text, nested types included. Every CIR value and many attributes
reference a type, so after the attribute encodings (#229586) types are
most of what is left as text in a CIR bytecode file.
This adds native encodings for every CIR type except !cir.struct and
!cir.union:
- Integer (width, signedness, _BitInt), the floating-point types and
long double, bool, void, vptr.
- Pointer (with its address space), array, complex, function (the return
type is absent for void, so it carries a presence flag), vector (fixed
or scalable), matrix.
- Data member and method pointers, bit-field access units (plus
#cir.bitfield_decl, so they store no text), the CUDA surface/texture
types and the EH token types.
[13 lines not shown]
ARM: Use LastSubtargetCache in getSubtargetImpl (#242561)
Reuse the last subtarget for functions with the same function attribute
set and module, or the same subtarget relevant attributes, float ABI
and ABI, instead of building the subtarget key. This works towards
all targets using a common pattern.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[libc++] Submit the LNT results of main commits as the main branch (#243970)
LNT now supports a concept of branches. This patch changes the CI jobs
to submit data as being under the `main` branch.
Assisted by Claude
[NFC][clang] Adjust PPMemoryAllocationsTest ASan threshold (#244162)
The #243000 reduced the BumpPtrAllocator's GrowthDelay from 128 to
8, so the geometrically growing slabs leave the currently open slab
mostly empty. The test measures getTotalMemory(), which counts slab
capacity, and the 1M-#define workload now reports 150.96 bytes per
define under ASan instead of about 136.8, failing the 145.0 bound.
The bytes actually requested are unchanged; only the unused tail of
the last slab is larger.
Raise the ASan bound from 145.0 to 160.0 to cover the slab slack, as
done for the redzone overhead in #209024. The non-ASan bound of 130.0
is unchanged.
Attributor: Use types instead of IDs in AAKindSet (#244076)
Some MSVC builds reject the addresses of IDs of abstract attributes in
anonymous namespaces as template arguments. Pass the abstract attribute
types instead and compare the types to find the mask bits, which also
works with older GCC.
Fixes 19901848353e
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AArch64] Share materialized constant between add x,k and sub x,k (#225430)
## Summary
Fixes Issue
#[222095](https://github.com/llvm/llvm-project/issues/222095).
When a function needs the same constant magnitude `k` both added and
subtracted (e.g. `use(a + k, b - k)`), and `k` doesn't fit as a direct
arithmetic immediate on this target, LLVM previously materialized two
unrelated constants -- `k` and `-k` -- into two separate registers, even
though only one ever needed to be built.
Example (from the linked issue, `k = 4097`):
```c
u32 use(u32 a, u32 b);
auto src(u32 a, u32 b) {
u32 k = (1 << 12) + 1;
[16 lines not shown]
[Driver][AMDGPU] Enable sanitizers AMDGCN flavoured SPIR-V (#241411)
Sanitizer support was not advertised for AMDGCN flavoured SPIR-V, which
is incorrect. The gating was based on XNACK being enabled (which, with
SPIR-V can only be ascertained at finalisation time) and on the triple
being an AMDGPU one. This patch corrects both of those aspects.
ffs_bdflush(): do not call VOP_FSYNC(devvp) for unlocked devvp
Instead, delegate the fsync to taskqueue, which can lock mntfs devvp.
The asynchronous fsync there is fine because bdflush() is not guaranteed
to write anything at all.
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[mlir] Handle lexical/dominance inversion in OperationEquivalence
Operation equivalence used to traverse blocks in their lexical order, i.e., the
order in which they are stored in the region. This order is not guaranteed to
match the dominance order. Operation equivalence therefore would not have
marked dominating values from a lexically following block as equivalent in the
cache, and would incorrectly consider them as not equivalent.
Traverse all blocks first to record equivalence between arguments and op
results first, then look at operands separately.
[IndVarSimplify] Use context to prove a narrow IV def non-negative (#236461)
When IndVars widens an IV, it checks for each narrow def (the IV and its
users) whether it is non-negative on every iteration. If so, zext and
sext of it are equal, so when widening the def’s users they can use
either.
Previously, non-negativity of the def was proved without context, so in
some cases we were unable to prove it and left trunc + zext pairs in the
code.
Now we ask SCEV at the def’s context, which lets it use dominating
guards and assumes.
This allows it to not insert unnecessary truncs/zexts. E.g. in
```
if (m > 0)
for (i32 i = 0; i < m; i++)
use(zext(i + m <nsw>));
```
[8 lines not shown]
[IndVarSimplify][LoopVectorize][NFC] Add tests for widening a non-negative IV (#236443)
IndVars widens users of a non-negative IV with both sext and zext, but
doesn’t use guards on the IV start to prove it non-negative. It leads to
spare trunc + zext inserted for widened users.
Add tests for widening of the IV and its users with guards showing that
the IV start is non-negative.
Also add vectorizer tests showing that widening i - 32 affects runtime
checks, and tests showing that the widened IV worsens SCEV’s constant
max backedge-taken count after the exit rewrite to an smax bound.
if_vxlan: reconcile tunnel state when the local address changes
An administratively up VXLAN with an explicit source address should
start when that address becomes local. When the last local copy is
removed, stop the tunnel but retain IFF_UP so it can restart later.
Use the IPv4 and IPv6 source-address notifications used by if_gif.
Defer VXLAN work to a dedicated task queue because starting and stopping
VXLAN requires sleepable operations, including UDP socket and multicast
membership setup and teardown. Recheck the current address state under
the existing start/stop lock so coalesced events and duplicate local
addresses are handled by the same state transition.
Use the original host credentials and socket FIB for deferred starts.
Restrict this proposal to the default VNET and host-originated starts.
A long-lived jail credential could hold the prison and pin its VNET.
The change acts on address notifications emitted by the IP stack.
Base: opnsense/src stable/26.7 (9d35d0d196e41162383d4b3d72057e8c7a57e7a4)
[2 lines not shown]