[NewPM] Only add passes after optimized RegAlloc if a target enables it
The legacyPM allows for returning a boolean from
addRegAssignAndRewriteOptimized, and if set to false, some extra passes
at the end of addOptimizedRegAlloc are not added. Before this patch, the
NewPM would only omit adding these passes if an error was thrown, which
gets propagated all the way back up and prevents compilation.
This is necessary behavior for targets that do not perform register
allocation, like WebAssembly, that will otherwise crash in places like
MachineLICM.
Reviewers: arsenm, aeubanks
Pull Request: https://github.com/llvm/llvm-project/pull/210792
[mlir][acc] Lower per-thread array reductions correctly (#210453)
Lowering an acc.reduction_accumulate_array to a per-element
gpu.all_reduce is only valid when each thread owns its own accumulator
copy. This was inferred from the memref's static size, which was wrong
for dynamically-shaped accumulators and for storage seen through
descriptor or strided views.
Per-thread accumulators that fit the local stack budget are materialized
in stack memory; anything larger, or gang-scoped, is materialized in
shared memory. Classify from that: a stack alloca (or a view over one)
within the budget is per-thread, a shared allocation is block-shared,
and a dynamically-shaped accumulator is classified from its par_dims.
Materialization and predication follow the same rule, and writes to a
privatization are recognized through views/casts so per-thread setup
runs on every owning thread.
[lldb] Avoid data race when clearing an OptionValue (#208471)
The clear function guarded by the internal mutex.
This happens when we have to threads one trying to set a value and the
other reseting the value.
The derived classes are forced to implement the `ClearImpl`. and base
`OptionValue` hold the mutex and calls `ClearImpl` on clear.
[NFC] [rtsan] Cleanup env for lit tests (#210395)
This matches the style of our other tests, and may make it easier for
others to maintain downstream if they override the `env_rtsan_opts`
variable with special platform specific options.
NAS-141848 / 26.0.0-BETA.3 / Handle type-safe snapshot-task attachments in pool export/import (by creatorcary) (#19350)
Non-cascade `pool.export` crashed with
`'PeriodicSnapshotTaskQueryResultItem' object is not subscriptable`,
aborting the export after it had already disabled the pool's
shares/services and its snapshot tasks.
The export/import attachment loops iterate every delegate's `query()`
results and subscript them as dicts (`attachment['id']`).
[NAS-139294](https://ixsystems.atlassian.net/browse/NAS-139294) made
`pool.snapshottask` return type-safe Pydantic models, so the
snapshot-task delegate now yields model objects that aren't
subscriptable. Guard both call sites (`pool_/export.py` and
`pool_/import_pool.py`) to fall back to attribute access, matching the
fix already on master in
[#19278](https://github.com/truenas/middleware/pull/19278).
Original PR: https://github.com/truenas/middleware/pull/19349
Co-authored-by: Logan Cary <logan.cary at ixsystems.com>
Merge tag 'mm-hotfixes-stable-2026-07-20-11-37' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc fixes from Andrew Morton:
"12 hotfixes. 8 are cc:stable and the remainder address post-7.1 issues
or aren't considered appropriate for backporting. 10 are for MM.
All are singletons - please see the relevant changelogs for details"
* tag 'mm-hotfixes-stable-2026-07-20-11-37' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
mm/memory-failure: trace: change memory_failure_event to ras subsystem
mm: page_reporting: allow driver to set batch capacity
mm/kmemleak: fix checksum computation for per-cpu objects
mm/damon/core: disallow overlapping input ranges for damon_set_regions()
MAINTAINERS: add Usama as a THP reviewer
fat: avoid stack overflow warning
mm/damon/core: validate ranges in damon_set_regions()
m68k: avoid -Wunused-but-set-parameter in clear_user_page()
mm/huge_memory: set PG_has_hwpoisoned only after new folio head is established
mm/page_vma_mapped: fix device-private PMD handling
[2 lines not shown]
src: fix static build with -pie in LDFLAGS
Add -Wl,--no-pie when linking pkg-static to avoid static PIE
which requires PIC in all objects, breaking with non-PIC system
static libraries on FreeBSD.
18261 want apic_id in cpu_info kstat
Reviewed by: Peter Tribble <peter.tribble at gmail.com>
Reviewed by: Jason King <jason.brian.king+illumos at gmail.com>
Approved by: Robert Mustacchi <rm+illumos at fingolfin.org>
[bazel][RuntimeLibcalls] Fix 30c0454414ec043dc50d2690f72a12719ab89d6c (#210796)
Add PredicateExpanderDag.cpp to the glob. Avoid adding
PredicateExpanderDag.h and instead switch to a glob to include all
headers. We can't glob the .cpp files due to a circular dep when
including TargetFeaturesEmitter.cpp.
Merge tag 'v7.2-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu:
- Fix potential crash in rhashtable walk
* tag 'v7.2-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
rhashtable: clear stale iter->p on table restart
devel/cminpack: Update to 1.3.13
ChangeLog: https://github.com/devernay/cminpack/releases/tag/v1.3.13
* Fix a division by zero in covar1 when the Jacobian rank equals the number of
residuals (m == rank, e.g. square full-rank problems), which produced Inf/NaN
throughout the covariance matrix.
* Make the banded finite-difference branch of fdjac1 call the user function
with iflag=2, like the dense branch, fdjac2 and the FORTRAN version.
* Fix the USE_BLAS Newton correction in lmpar to use all n components (it was
truncated to the original Jacobian rank, giving a wrong step for
rank-deficient problems).
* Fix the jpvt memset size in the USE_LAPACK qrfac, and make the work-array
size checks in hybrd, hybrj, hybrd1, hybrj1 and lmdif1 overflow-safe (also in
the f2c versions).
* Guard a harmless transient infinity in dogleg for rank-deficient Jacobians
(also in the f2c version).
ChangeLog: https://github.com/devernay/cminpack/releases/tag/v1.3.12
[16 lines not shown]
cad/openvsp: Update to 3.51.1
Features:
* AI assisted, profile guided optimization in several areas.
* Refactor HumanGeom math to store less data and do less math.
[NewPM] Port LegacyPM regalloc Refactoring
This didn't seem to make it into the original CodeGen NewPM patches, so
add it now to keep things consistent. This also removes duplicate
StackSlotColoring passes.
Originally done for the LegacyPM in
c9122ddef5213fbdd2d82c473a74e1742010f62f.
Reviewers: arsenm, aeubanks
Pull Request: https://github.com/llvm/llvm-project/pull/210760
NAS-141848 / 26.0.0-RC.1 / Handle type-safe snapshot-task attachments in pool export/import (#19349)
Non-cascade `pool.export` crashed with
`'PeriodicSnapshotTaskQueryResultItem' object is not subscriptable`,
aborting the export after it had already disabled the pool's
shares/services and its snapshot tasks.
The export/import attachment loops iterate every delegate's `query()`
results and subscript them as dicts (`attachment['id']`).
[NAS-139294](https://ixsystems.atlassian.net/browse/NAS-139294) made
`pool.snapshottask` return type-safe Pydantic models, so the
snapshot-task delegate now yields model objects that aren't
subscriptable. Guard both call sites (`pool_/export.py` and
`pool_/import_pool.py`) to fall back to attribute access, matching the
fix already on master in
[#19278](https://github.com/truenas/middleware/pull/19278).
[Clang][AMDGPU] Search both amdgcn and amdgpu libraries again (#210767)
Summary:
Extension to https://github.com/llvm/llvm-project/pull/209770/, the
previous one did not cover all cases we search paths, it only did the
relative paths for a few cases. This adds it to the other case, should
be the same logic and motivation.