[MLIR][Python] Drop Python 3.10 and enable Python 3.15
Python 3.10 is EOL, so raise MLIR_MINIMUM_PYTHON_VERSION to 3.11.
For Python 3.15:
- Require nanobind >= 2.13. Earlier versions' darwin-ld-cpython.sym lacks
PyFrozenDict_Type (new in 3.15), so linking the bindings against 3.15
fails on macOS with an undefined symbol.
- Raise the numpy cap to 2.5.4; numpy <= 2.4 has no cp315 wheels.
[flang][OpenMP] Lower array-section workdistribute assign to element loop (#225595)
Summary:
- At -O0 an array-section assignment inside `omp target teams
workdistribute` (e.g. residuum(0,:,:) = residuum(n,:,:)) stays as a
`_FortranAAssign`/`_FortranAAssignSimple` runtime call, since HLFIR only
inlines it to explicit loops at -O1+.
- Identify and lower `array-to-array` assigns to two unordered loops
through a heap temporary (src -> tmp -> dest), using `fir.array_coor` so
strides are honored. This handles overlapping sections.
- Runtime-call lowering now runs before fission and emits at the call
site, so each loop gets its own kernel.
- Rename the scalar broadcast helper to
`replaceScalarToArrayAssignWithUnorderedDoLoop`.
- Tests: Strided array assign and overlapping same-array assign tests
are added.
Assisted by: cladue opus 4.8
[flang][OpenMP] Fix dangling map.info members in workdistribute target split (#225440)
**Summary**:
- Flang `lower-workdistribute` pass splits an `omp.target` that contains
a `workdistribute` into an `omp.target_data { omp.target }` nest,
cloning every `omp.map.info` for the inner target.
- A Fortran allocatable/pointer is mapped as two linked maps: a
descriptor map whose `members` operand points at its data map.
- The old clone copied `members` verbatim, so the inner descriptor clone
still referenced the outer/original data map instead of its inner
sibling.
- **Fix**: Clone with an `IRMapping` so `members` operands are
retargeted to the inner clones, and clone in dependency order.
- Add a regression test exercising an allocatable descriptor/data member
pair.
Assisted by: claude opus 4.8
[RISCV] Add subtarget feature to disable use of vector avgceil/floor nodes. (#231609)
The cost of the vxrm write makes using these instruction not profitable
on 525.x264_r on current SiFive OoO cores.
[Clang] Avoid assertions for unevaluatable object size kinds (#231793)
Constant-evaluated calls to __builtin_object_size and
__builtin_dynamic_object_size may have a second argument that cannot be
evaluated. The legacy evaluator incorrectly assumed it was a known
constant integer, which could trigger an assertion.
Evaluate the argument through the current evaluator and propagate
evaluation failures instead of calling EvaluateKnownConstInt.
Add regression coverage for division by zero, function calls, runtime
parameters, volatile reads, and null pointer dereferences. The tests
cover both object-size builtins and both constant evaluators.
AI assistance was used to generate additional regression test cases,
which I reviewed and adapted.
Fixes https://github.com/llvm/llvm-project/issues/231108
[2 lines not shown]
[RISCV][P-ext] Use ISD::AVGSUBFLOOR(S/U) for (p)asub(u).
This replaces RISCVISD::ASUB(U) with ISD::AVGSUBFLOOR(S/U).
Co-Authored-By: Claude Sonnet 5.5 <noreply at anthropic.com>
[SelectionDAG] Add AVGSUBFLOORS/AVGSUBFLOORU opcodes
These represent a halving subtract: trunc(shr(sub(ext(X), ext(Y)), 1)),
rounding towards negative infinity. They correspond to AArch64 shsub/uhsub
and RISC-V P extension asub/asubu.
Includes some legalization, known bits, constant folding, and
a DAGCombiner fold from (sr[al] (sub nsw/nuw x, y), 1).
The operation is not legal any target yet. That will be done in
follow ups.
Co-Authored-By: Claude Sonnet 5.5 <noreply at anthropic.com>
[AMDGPU][SwLowerLDS] Rebase flat to LDS addrspacecasts to buffer offsets (#227985)
**Issue:**
In `amdgpu-sw-lower-lds` pass:
- LDS is moved/lowered into an `__asan_malloc_impl` buffer. AS3 pointers
hold offsets into it, and each LDS access is rewritten to `buf +
offset`.
- LDS to flat casts produce `buf + offset`. Casting that back to AS3
kept the full address, so the next access went out of bounds.
**Fix:**
- Collect flat to LDS casts and rewrite them as
`inttoptr(trunc(ptrtoaddr(flat) - ptrtoaddr(buf)))` to get the offset
back. The existing translation handles the users.
- Covers kernels and already-lowered non-kernels.
**Note :**
- Non-kernels that only take a flat pointer are handled in a follow-up
#228043.
Assisted by: claude opus 5.5
graphics/photivo: the port had been slightly improved (+)
- Stretch out CMAKE_MINIMUM_REQUIRED() version range to
accommodate for upcoming CMake 4.x and beyond
- Drop `dos2unix' from USES in favor of PATCH_ARGS+=-l
graphics/photivo: the port had been slightly improved (+)
- Stretch out CMAKE_MINIMUM_REQUIRED() version range to
accommodate for upcoming CMake 4.x and beyond
- Drop `dos2unix' from USES in favor of PATCH_ARGS+=-l