Firewall: Aliases - remove unused "EU" workaround (Maxmind seems to have removed these entries) and add Kosovo which isn't in IANA's list. closes https://github.com/opnsense/core/issues/11210
[MachineLICM] Track peak register pressure when hoisting
The pressure check in MachineLICM only looks at the estimates saved in
BackTrace. These record pressure at block boundaries, so they can miss an
earlier peak in the current BB or an ancestor BB. If pressure falls before the
candidate, the check can allow it to move even though its def then needs to stay
live across that earlier peak. This can push pressure beyond the limit and cause
spills.
This PR adds PeakPressure alongside RegPressure and saves the previous peak with
the existing boundary estimate in BackTrace. The pressure check considers the
current BB's peak and both saved estimates. Normal hoists adjust the current and
saved peaks, and scope exit restores the previous peak. Preheader scanning skips
peak updates and seeds the starting pressure from its final estimate.
Fixes LCOMPILER-3233.
This PR was assisted by AI but I reviewed all the changes.
[CodeGen] Honor -stress-regalloc in register pressure limits
computePSetLimit falls back to the target pressure limit when the reserved
register weight is at least that limit. This avoids underflow, but loses
allocation restrictions such as -stress-regalloc.
Bound this fallback by the remaining allocatable register weight. The
allocatable count already includes the stress limit. Keep the existing
subtraction when it leaves a positive limit and the zero-allocation
fallback.
Add an AMDGPU MIR test for stress limits that block or allow hoisting.
Add an X86 MIR test to check that a stress value which clips no allocation
order preserves the normal pressure adjustment and hoisting result.
Update the affected AMDGPU stress test.
Validation: all 51 stress-regalloc tests pass with MachineLICM unchanged.
With the stacked MachineLICM change, the full LLVM suite has 80,791 passes
and no unexpected failures.
[2 lines not shown]
[LFI][AArch64] Do not save or restore LFI reserved registers (#241545)
Marks LFI's reserved registers using `ReserveXRegister` so that they are
omitted by calling conventions and builtins like
`__builtin_unwind_init`. Also uses `ReserveLRForRA` to mark `x30` as
reserved.
[llubi] Return poison for OOB base ptr for GEP inbounds (#242603)
Before this patch, llubi would not return poison for a getelementptr
inbounds instruction that ended up back inside the original allocation
because we never checked whether the base pointer was in bounds.
Fixes #235438
Assisted-By: LLM
Allocate display rows on demand (Hua Zhong)
libedit (unlike readline) allocates a buffer for the entire terminal width *
height from the beginning, which is often wasteful as most of the time very
few rows are needed. This change introduces delayed allocation for row buffers.
Initially, the row-pointer array is allocated with NULL pointers. When we need
row N, we allocate all row buffers up to that row.
Display buffer allocation failures are reported through existing API errors.
A subsequent API call such as el_gets() retries the allocation if needed.
Support: Only use aligned allocation in allocate_buffer when needed
allocate_buffer always used aligned operator new, which is much slower
than plain operator new. Plain operator new already guarantees
__STDCPP_DEFAULT_NEW_ALIGNMENT__, which covers most callers, such as
DenseMap. Only use the aligned form for larger alignments.
CTMark instructions:u: O3 -0.13%, ThinLTO -0.12%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Verifier: Check each string function attribute once
verifyFunctionAttrs looked up about 35 string attributes by name for
every function and call site. Iterate over the string attributes that
are present instead, and only look up the attributes they depend on.
Whole O3 instructions in opt:
kimwitu++ k.bc -1.03%, SPASS cnf.bc -0.34%, sqlite3 -0.12%.
CTMark instructions:u: ThinLTO -0.05%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[RISCV] Mark that the register spill libcall clobbers X6. (#238079)
I've added a test, but it was already fixed by clobbering x6-x7
on tail calls for the restore.
Fixes #235697
[llc,llvm-mc] Remove redundant MCOptions.LibraryOptions assignments. NFC (#242672)
mc::getMCTargetOptions and codegen::getTargetOptions (#242671) now set
MCOptions.LibraryOptions to the context they read.
[MC] Set MCTargetOptions::LibraryOptions in getMCTargetOptions (#242671)
Set the `LibraryOptions` pointer in getMCTargetOptions, so that tools
like llc/llvm-mc can stop setting it by hand. With this change,
`lli -jit-kind=mcjit -x86-indirect-branch-tracking` emits no endbr64.
[InstCombine] Handle nuw in foldCmpLoadFromIndexedGlobal (#242665)
nuw is safe to handle with any stride and without masking as it means
`Offset + (Index * Stride)` can't wrap.
[IR] Remove unused private type aliases (NFC) (#242614)
AtomicCmpXchgInst::AtomicOrderingBitfieldElement and
AtomicRMWInst::AtomicOrderingBitfieldElement: The last uses were removed
on July 7, 2020 in commit abdd367b200a0bf4176dbdaf200b23f750a35cb0.
TimePassesHandler::PassInvocationID: The last uses were removed on
March 27, 2020 in commit 0125db9ab21de29191e04fe021bb675b146f2645.
Assisted-by: Antigravity
[IPO] Remove unused SampleProfileProber::CurModuleUniqueId (NFC) (#242613)
The last use was removed on April 14, 2025 in commit
8e8d04870dbc3248301534796b4370f75e33f7c0.
Assisted-by: Antigravity
Fix double free when cloning a block with a pending free
dmu_read_l0_bps() captures the source block pointers for a clone
without consulting dnode_block_freed(). A block whose free is recorded
but not yet synced still has a valid on-disk pointer, so the clone
registers a BRT reference to a block about to be returned to the
allocator, and it is freed twice. On a debug build this trips the
metaslab double-free verifier; on a release build the space map is
silently corrupted.
Check for a pending free and return EAGAIN, as dbuf_read_hole() already
does for buffered reads. zfs_clone_range() waits a TXG and retries, by
which point the block reads as a hole.
Two cases need more than the plain check. A hole has nothing to free,
so guard with !BP_IS_HOLE(bp), otherwise a hole inside a pending free
range fails a FICLONE that master cloned. When the head dirty record
already overrode the BP, only frees after the override count against
it, so use dnode_block_freed_after(); dbuf_free_range() leaves the
[19 lines not shown]