[DebugInfo][WebAssembly] Anchor stack locals to the frame base (#211826)
WebAssembly's stack pointer is not a register that can be described in
DWARF. When a function has no virtual frame base, because its stack
pointer is never explicitly referenced (e.g. a function whose only local
is dead), the frame base falls back to the __stack_pointer global and
the frame register is the physical SP.
addMachineReg failed for that register, so addMachineRegExpression
dropped the base and the caller emitted the frame offset with nothing
under it: a bare DW_OP_plus_uconst that underflows the DWARF stack when
the location is evaluated.
```
DW_AT_frame_base (DW_OP_WASM_location 0x3 0x0, DW_OP_stack_value)
DW_AT_location (DW_OP_plus_uconst 0xc) ;; before
DW_AT_location (DW_OP_fbreg +12) ;; after
```
[10 lines not shown]
[LangRef] Rewrite the elementwise atomic description and reject seq_cst elementwise atomics (#209931)
This is a follow-up on the discussion here:
https://github.com/llvm/llvm-project/pull/204329
The problem with specifying `seq_cst` on `elementwise `atomics is that
the LangRef states:
> there is a global total order on all sequentially-consistent
operations on all addresses.
But the individual accesses of `elementwise` `seq_cst` atomics are not
consistent, which contradicts this. I think we could refine this in the
future, but start off by saying `seq_cst` is not permitted.
I think my clarification of the LangRef makes the following example
clearer:
```
[18 lines not shown]
deskutils/calibre: Add dependency on py-sqlite3
py-sqlite3 is required for reader device automount to work properly.
MFH: 2026Q3
(cherry picked from commit 26fdd7a8b8e48b3937a289182beaf719e8627f0d)
[Instrumentor] Improve filtering for flag values (#206667)
This pull request modifies the instrumentor's filter expression parser.
It introduces the logical not operator (`!`), flag property access (e.g.
`flags.nuw`), and binary literals.
databases/mysql-connector-java51: Remove expired port
2026-07-24 databases/mysql-connector-java51: Superseded by mysql-connector-j, no users in the tree.
dmu_recv: Avoid potential null deref
Compilers are smart enough to deref only if the first && operand is
true, so this is mostly to avoid false positives from sanitizers.
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko at klarasystems.com>
Closes #18848
DDT: Fix several bugs in pruning
- Fix variables types to avoid overflows after 2B entries.
- Make ddt_prune_walk() code some more symmetrical.
- Fix zero oldest on exact target to histogram value match.
- Make bin 0 properly start from 0, not 1 hour.
- Take as a cutoff base a time of histogram build start.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
Closes #18838
zpool initialize: add -z to write zeroes
zpool initialize writes a non-zero pattern (0xdeadbeefdeadbeee) to free
space. The pattern can be changed globally with the
zfs_initialize_value module parameter, but there was no per-command way
to zero free space, which is what is wanted to reclaim thinly
provisioned backing storage.
Add a -z/--zero flag to "zpool initialize" that writes zeroes for that
run. The fill value is threaded from the CLI through libzfs and the
POOL_INITIALIZE ioctl into vdev_initialize(), and is recorded in the
leaf ZAP so a run that is suspended and resumed (including across export
and import) keeps writing the same value. When no value is supplied the
zfs_initialize_value default is used, preserving existing behavior. -z
is only valid when starting initialization.
The zpool-initialize(8) page notes that -z targets backing storage which
does not support TRIM and points at zpool-trim(8) as the more efficient
option when the device does support it; zfs.4 documents
[12 lines not shown]
[flang-rt] - Reduce ShallowCopy template instantiations to improve LTO time (#209915)
Limit `ShallowCopy` rank specializations from 1-15 to 1-4, using a
generic fallback for higher ranks. This significantly reduces code size
and LTO compile time when the Fortran runtime is linked into GPU
offloading code.
Before: 15 ranks × 7 types × 3 scenarios = 315 template instantiations
After: 4 ranks × 7 types × 3 scenarios = 84 template instantiations +
fallbacks
Trade-off: Arrays with rank > 4 use a generic runtime loop instead of
compile-time specialized iteration. This is acceptable because:
- Most real-world Fortran arrays are rank 1-3
- Rank 5-15 arrays are rare in practice
- The generic loop is still efficient (just not unrollable)
## Results
### Compilation Time (from `time` command)
[35 lines not shown]
[flang][cuda] Use cuf.register_variable_static instead of CUFRegisterExternalVariable (#211886)
This gives more flexibility to the backend to select a different
registration mechanism
[Pipeliner] Use VRMapPhi to generate phi in epilog (#211723)
When generating a phi in the epilog block corresponding to an existing
phi in the loop, the loop value should come from the new phi generated
in the kernel block (for a non-phi instruction in the loop) rather than
directly from the value map of the previous stage.
The new phis generated by generatePhis for non-phi instructions are
stored in VRMapPhi. Thread VRMapPhi through generateExistingPhis and add
a helper getMapPhiReg that returns the phi-generated register when
available, falling back to VRMap otherwise.
Without this fix, the epilog can pick up the initial prolog value of a
loop-carried register instead of the last kernel-iteration value,
producing incorrect results for pipelined loops with two or more stages
that carry values across iterations. This has been observed on Hexagon
with the modulo scheduled epilog of a right-shift-with-carry loop after
loop unrolling.
Fixes #208943
LinuxKPI: page pool updates and add to the build
Split implementation out from the header files.
This "page pool" is the very minimalistic version we need in order to
support packets on mt76.
We allocate the page pool in order to have the meta data available of
which we only make limited use.
This implementation does no pooling, it does no page fragments for now,
it always hands out a full page and frees it upon return.
It is written in a way that it can be in the tree before the 'struct page'
work it depends on has landed in order to reduce friction for people who
want to try mt7921 (or others later) upfront. We use the same #ifdef
as in the struct page work for that reason so one knob will turn everything
on or off.
Once the struct page work has landed and settled we can start filling this
with more complexity.
[8 lines not shown]
LinuxKPI: page.h: resort lines
Two of the "page macros" can be abstracted elsewhere in the upcoming
struct page work, so sort them away from the four which are here to
stay.
No functional change.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D58299
LinuxKPI: page.h: use atop() and ptoa() instead of PAGE_SHIFT
With upcoming changes to 'struct page' this will make the lines
easier to read by using the predefined macros from param.h.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: markj, kib
Differential Revision: https://reviews.freebsd.org/D58298
LinuxKPI: prefer struct page [*] over struct vm_page[_t]
LinuxKPI is based on Linux 'struct page' which is currently aliased
to struct vm_page. Upcoming changes may change that so start using
'struct page *' instead vm_page_t to make future changes transparent.
This is a continuation of 9e9c682ff3a1 and should be a NOP.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste (no objections)
Differential Revision: https://reviews.freebsd.org/D58297
LinuxKPI: move clear_page() within the linux/page.h file
clear_page() would normally live in asm/page.h but adding the file
and fixing the dependencies would be too much for a single line.
Move the function to the end of the file with a clear separator
and make it clear that it does not operate on a 'struct page'
but on a page address by changing the argument name and leaving
a comment.
The function is currently used by at least mthca(4) as the only
in-tree consumer, and drm-kmod ttm_pool.c.
No functional changes.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D58296
LinuxKPI: pci: fix dma handle type in match function
dma_addr_t is a vm_paddr_t which is a uint of some width. Rather than
passing pointers of it around pass the value.
Comparing the addresses of different storage for the same dma handle
(the actual bug here) will not work when passed to the devres match
function.
Sponsored by: The FreeBSD Foundation
Fixes: 0a575891211ef ("implement dmam_free_coherent()")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D58285
[AMDGPU] Fix instruction size of LDS-DMA buffer loads (#211302)
Mark i1imm_0 as OPERAND_IMMEDIATE type, so its packed 1-bit value is not
mistaken for a trailing literal (same for InstFlag).
Applies to the swz/IsAsync fields of buffer (MUBUF) and FLAT LDS-DMA
instructions.
Changes estimated size for the corresponding instructions; codegen stays
untouched.
Add unit test, checking encoded size is 8 bytes (was: 12).
AI-assisted.
[SCEV] Use SCEVPtrToAddr instead of SCEVPtrToInt in SCEV. (#180244)
Use SCEVPtrToAddr instead of SCEVPtrToInt for pointer -> int
conversion in SCEV, like when computing trip count expressions.
getPtrToIntExpr now also creates SCEVPtrToAddrExpr.
Removal of SCEVPtrToIntExpr out of this PR, to limit the scope and
will be done as NFC follow-up.
PR: https://github.com/llvm/llvm-project/pull/180244