[mlir] Build llvm.mlir.constant attributes from the result type
Many conversion patterns created `llvm.mlir.constant` with a value attribute
whose type does not match the result type. The most common case was pairing an
`index`-typed attribute with the converted index type:
llvm.mlir.constant(1 : index) : i64
but there were also plain width and signedness mismatches, e.g. NVGPU's
`makeI64Const` built `i64` constants from `i32` attributes, and the NVVM `fdiv`
expansion used `ui32` attributes on `i32` values.
Translation to LLVM IR ignores the attribute type and uses the result type, so
the emitted IR was correct, but the attribute type is meaningless in this state
and anything that reads it back sees the wrong type. Derive the attribute from
the result type in every case; where the result is the converted index type,
`LLVM::createIndexAttrConstant` now does this for all of its callers.
In `ArithToLLVM`, retype the value attribute when the type converter maps
[13 lines not shown]
[mlir][NFC] Expose getConstantElementType from the LLVM dialect
The `llvm.mlir.constant` verifier determines the element type it compares by
looking through LLVM array types and then a vector or tensor type. Conversion
code that builds such constants needs the same notion, so make the helper
available instead of leaving it file-static in `LLVMDialect.cpp`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Revert "Reland "[Clang] Enable -Wunused-template under -Wall" (#208001)" (#218638)
This reverts commit 1529d35adbd6f13aa234a5f4cfd9ac0e28bdd338.
There are two issues:
- The change appear fairly disruptive so close to release (see comments
on #208001)
- there are false positives (see #218429)
(cherry picked from commit 8710728e04184f0a695a3898effd40df5a2b8aef)
[X86] Fix NaN handling in minimumnum/maximumnum zero fixup (#217420)
Fix the X86 lowering of `minimumnum`/`maximumnum` when the first operand
is NaN and signed-zero handling is required.
`PSEUDO_FMIN`/`PSEUDO_FMAX` already select the numeric second operand
when the first operand is NaN. However, the subsequent signed-zero fixup can
modify that numeric result using the sign bit of the first operand.
For example, `minimumnum(-qNaN, +1.0)` can therefore turn the correctly
selected `+1.0` into `-1.0`.
Restore the second operand when the first operand is NaN after the
signed-zero fixup. The additional check is restricted to numeric min/max
operations where NaNs cannot be ignored and the first operand is not
already known to be non-NaN.
The existing handling for a NaN second operand remains unchanged.
[14 lines not shown]
[lldb] Fix SBStructuredData::GetStringValue method (#216875)
In python the method's signature is
```py
class SBStructuredData:
def GetStringValue(self, dst_len: int) -> str:
```
There is no way from python to get the total data from GetStringValue
regardless of how many times you call GetStringValue.
Update the implementation
```py
def GetStringValue(self, len: int = 0) -> str:
```
Fixes crash when input is None in `SBStructuredData.SetStringValue`
Don't trim the result when called with the `dynamic` property.
(cherry picked from commit 93377d703115b45c3ad8f5f218cb85769d24a1b0)
[SCEV] Use the cheap BE-count formula if the IV cannot overflow. (#218251)
howManyLessThans computes the backedge-taken count as "((End - Start) +
(Stride - 1)) /u Stride" when that addition is known not to overflow,
and otherwise via getUDivCeilSCEV.
canIVOverflowOnLT returning false establishes RHS <= MAX - (Stride - 1).
End is max(RHS, Start) and Start is at least MIN, so the distance End -
Start is at most MAX - (Stride - 1) - MIN, which is UMAX - (Stride - 1)
for both the signed and the unsigned interpretation, and the addition
cannot overflow.
This unifies the logic matching the howManyGreatherThans, in preparation
for unifying it with howManyLessThans.
Alive2 Proof: https://alive2.llvm.org/ce/z/aXPPxq
PR: https://github.com/llvm/llvm-project/pull/218251
[OpenMP] Seed noalias for host callback captures
The generic Attributor can derive noalias and the related lifetime facts for callback-mapped capture arguments, but OpenMPOpt does not seed AANoAlias in its restricted host run. Consequently capture-container loads remain in loops under dereferenceable-at-point semantics.
Seed AANoAlias for pointer arguments mapped to broker operands by callback metadata. Existing call-site reasoning checks every callback and direct call site and rejects escaped or aliased slots. LICM can then hoist immutable capture-container loads without changing the callback ABI or adding an OpenMP-specific hoisting transform.
Add LLVM, Clang, and Flang coverage for pointer, scalar, and aggregate captures together with escaped, duplicated, unmapped, and unknown-use negatives.
[Attributor] Check callback broker argument aliases correctly
AbstractCallSite uses separate callback argument and broker operand numbers. AANoAliasCallSiteArgument currently skips the callback argument number while iterating broker operands, which can skip an unrelated operand and incorrectly infer noalias for aliased callback arguments.
Skip the mapped call-site operand instead. Add a duplicated-operand regression where the callback and broker argument numbers differ.
[mlir] Add splitForOpAtBound utility and use it in loop unrolling (#215108)
## Summary
Adds `splitForOpAtPoint` to split an `scf.for` at a given split point:
- first loop: `[lowerBound, splitPoint)`
- second loop: `[splitPoint, upperBound)`
The original loop is not mutated in place. Two new loops are cloned,
iter-args
are chained from the first to the second, uses of the original results
are
rewired, and the original op is erased. The helper returns `{first,
second}`.
The split point is validated as:
- `lowerBound <= splitPoint < upperBound`
- `step > 0`
- `splitPoint == lowerBound + k * step`
When the needed values are constant, an invalid split fails at compile
time.
When any of them is dynamic, the same conditions are emitted as runtime
[15 lines not shown]
[libc] Only use the x86_64 sqrt inline asm on x86_64 (#218721)
x86_64/sqrt.h is included whenever SSE2 is available, but it #errors out
unless the target is x86_64. This breaks 32-bit x86 builds which enable
SSE2 (e.g. -march=pentium4 -mfpmath=sse), so also require x86_64 here
and let 32-bit x86 use the unconditionally-included generic/sqrt.h
instead.
[mlir][SCF] Skip dynamic front-peeling for non-index loops (#218238)
`peelForLoopFirstIteration` computes the new lower bound with an
`affine.apply` whose operands are the loop's lower bound and step.
`affine.apply` requires operands of type `index`, while `scf.for` also
permits signless integer IV and bounds, so the operation can be
constructed with operands that it does not accept.
This is the same underlying issue as #216631 / #217909, in the sibling
"peel front" path.
Skip the front-peeling path when the loop induction variable is not
`index`, mirroring the guard added in #217909. The existing
constant-bounds path is unaffected.
---------
Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
Interfaces: Wireless: Devices - Migrate to MVC code, second phase, move settings from Interfaces into Wireless. closes https://github.com/opnsense/core/issues/10751 (#10796)
Move all settings from interface.XXX.wireless to wireless.clone and cleanup code referencing the old spot.
The console menu contained some, likely incomplete, code, which we will remove here as well, it doesn't feel very usefull trying to offer console configuration for wireless anyway.
Not all validations are being migrated, only the most relevant ones, which should be good enough.
Kernels ALL/i386 and ALL/amd64 warn "'ticket' may be used uninitialized"
at line 244, uvmfault_amapcopy(): "uvm_wait("fltamapcopy", ticket);".
Restructure to reflect the logic better and keep GCC quiet.
Ok: Taylor R Campbell
PR kern/58964: uvm: missing wakeup on uvmexp.free
PR kern/60029: panic: cpu0: softints stuck for 16 seconds
Fix control message handling in recvit to avoid out of bounds write
to userland
Because of the use of a unsigned variable to track the length of the
control buffer recvit can underflow that variable because of an unchecked
ALIGN(). This can be triggered by passing a too short buffer that is not a
multiple of _ALIGNBYTES + 1. In such a case the kernel copies out data past
the provided buffer.
On top of addding the missing overflow check this also uses the proper
socklen_t type for the msg_controllen and uses an unsigned int for the
still overloaded variable i.
The security implications of this are mainly theoretical. The correct use
of control message handling requires the use of CMSG_SPACE which ensures
the buffer size is properly rounded. In base only dig uses a buffer that
is not correctly rounded at the same time it is oversized enough to not
matter.
[2 lines not shown]
openssl: fix pkg-config rpath
For some reason there are two copies? and only one was fixed by pkgsrc,
but the other one was installed.
Fixes PR 60643.
Bump PKGREVISION.