[VPlan] Mark default value or ExtractLastActive as only first lane used. (#226153)
The default value (operand 0) of ExtractLastActive is the scalar value
of @llvm.experimental.vector.extract.last.active. Only the first lane is
used, mark accordingly.
PR: https://github.com/llvm/llvm-project/pull/226153
whereis(1): Simplify code
Simplify the way we build paths.
Avoid decolonification of source paths.
Remove gnu directories and add non-tracked ones.
Fix a memory leak while here.
Approved by: ngie@
Differential Revision: https://reviews.freebsd.org/D59846
[lld][LoongArch] Prevent relaxation oscillation for PCHi20 and CALL
Relaxation of pcalau12i+addi (relaxPCHi20Lo12, isInt<22>) and
call36/call30 (relaxMediumCall, isInt<28>) can oscillate: shrinking
one section moves a symbol, which flips isInt<N> for other sites and
changes bytesDropped again. In large programs (e.g. Rust) the PC of
a site can stabilize while Dest jitter near the range limit, so
remove keeps alternating between 0 and 4 and relaxOnce never settles.
Follow the same approach as RISCV::relaxCall: after a few passes, do
not allow remove to increase beyond the previous pass's value
(cur - delta). Pass that cap as prevRemove into the two helpers;
range checks may still clear remove (0) when the target goes out of
range.
No reduced in-tree stress test: the failure is layout- and
input-order-sensitive and was validated against a fixed response-file
reproduction in the bug issue.
arm64 pmap: Eliminate redundant icache synchronization
Creating an executable user-space mapping to write-back memory
synchronizes the icache with the page's contents, whether or not those
contents have changed since the previous synchronization. Use the pmap
private page flag PGA_ICACHE_SYNCED to record that the icache has been
synchronized with a managed page's contents and that the page has no
writable mappings. When the flag is set, the creation of another
executable mapping to the page can skip the synchronization. The flag
is cleared when a writable mapping to the page is created, using a
single atomic operation that keeps PGA_WRITEABLE and PGA_ICACHE_SYNCED
from ever being simultaneously set, and when the page's last mapping is
destroyed.
Assisted-by: Claude Code (Fable 5.1)
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D59865
vm_page: Replace PGA_EXECUTABLE with PGA_PMAP_PRIV1
At present, PGA_EXECUTABLE is only used by the powerpc mmu_oea64 pmap.
The MI layer only accesses this flag to assert that it is clear when a
managed page is freed. Soon, we will need a similar, but not identical,
machine-dependent flag in the arm64 pmap. So, we rename this flag to
PGA_PMAP_PRIV1, simply saying that it is reserved for use by the pmap.
Each pmap can then define a name that best reflects its own meaning.
However, we still assert that this flag is clear when a managed page is
freed.
No functional change.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D59995
[CodeGen] Keep wave-profiled spill frequencies positive
SpillPlacement expects positive block weights, but a valid wave profile can
record zero executions for a CFG-reachable block. Giving such a block zero
spill cost can make the allocator choose a very different placement.
Clamp every accepted wave-derived frequency to at least one, as we already
do for nonzero counts that round down to zero. Unmeasured or rejected blocks
still use their existing MBFI frequency. Add a focused MIR test for a valid
zero-wave record.
This pattern arose in a profiled Composable Kernel convolution case. With
the separate spill correctness fixes and partial spilling enabled, the
zero-cost policy failed two CPU-reference checks; the positive floor passed
both. The test checks the cost directly; the application result was checked
separately on gfx950.
Stop using non-standard UID_MAX and GID_MAX because a variety of code
uses inclusive comparisons such that the UINT_MAX value aliases on top
of -1 and causes issues. First instance of this reported by Acts1631.
joint work with millert
Stop using non-standard UID_MAX and GID_MAX because a variety of code
uses inclusive comparisons such that the UINT_MAX value aliases on top
of -1 and causes issues. First instance of this reported by Acts1631.
joint work with millert