[mlir][openacc] Copy all host function attributes to the device routine (#226127)
`createFunctionForDeviceStaging` copied only the discardable attributes
of the host function, so the device copy lost sym_visibility, arg_attrs,
res_attrs and no_inline, which are inherent attributes of func.func. A
private host with llvm.signext/llvm.noundef on its signature became a
public function with a bare signature.
Fixes #225259
[CodeGen] Use validated wave counts for AMDGPU spill costs
Lane-based block frequencies can understate the cost of a spill in
divergent GPU code: a wave still executes a block with only some lanes
active. Use measured block-wave counts to weight SpillPlacement's costs
relative to the original entry-wave count.
Opt in on AMDGPU only. Accept a measured count only when its IR block
maps uniquely to a machine block with matching predecessors and
successors. Keep the existing MBFI cost for unmeasured or rejected
blocks, and leave branch probabilities and general BFI unchanged.
tests/sys/kern: skip unix_connectat fdescfs cases when fdescfs is missing
unix_connectat's fdescfs cases call mount_fdescfs(), which skipped on ENODEV.
nmount(2) never returns ENODEV: vfs_donmount() remaps the ENODEV from a failed
fdescfs module load to EINVAL with errmsg "Invalid fstype", so the skip never
fired and the cases failed on kernels without fdescfs.
Approved by: ngie, asomers
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59227
[SCCP] Implement Structure support in Selection (#225946)
Same as my previous work on PhiNode, we support structure in SelectInst
if there is at least one member is not overdefined.
As structure type check code has multiple consumers now, we create a
helper function forEachLatticeElement, which accept a function to
indicate what we want to do for a single lattice element. The lattice
getter function is passed as a currying function of the callback.
Also, remove an assertion for testing DenseMap reference as
isInstFullyOverDefined has already emit elements in DenseMap.
[TargetParser] Add a list of Intel GPUs, and use it in offload-arch (#222072)
Currently offload-arch prints Intel GPU identifiers like "Intel(R) Data
Center GPU Max 1100" which are not legal values for clang's
--offload-arch option.
Print an architecture name instead, e.g. "xe-pvc". The driver reports a
GPU IP version, the GMDID, for every device. Add a table that maps a
GMDID to a name, and look the device up in it. A device that is missing
from the table is printed by its numeric version, e.g. "xe_35.11.0". A
device whose driver does not report a GMDID is skipped.
The table goes in llvm/TargetParser, next to the other GPU lists,
because other tools need it too. Some of them are LLVM libraries, which
cannot include a clang header.
Every row of IntelGPUTargetParser.def holds a name that --offload-arch
accepts, the major and minor components of the GMDID that the device
reports, and the IGCA (Intel Graphics Compute Architecture) target and
[10 lines not shown]
CodeGen: Fix SplitCriticalEdge using wrong VNInfo for subranges
This fixes verifier errors when LiveIntervals is run before phi
elimination.
When extending a live interval across a newly split critical edge for a
PHI source operand, the subrange segments were added using the VNInfo of
the main range instead of the subrange's own value. Look up the
subrange's value at the predecessor's last index, as the other subrange
loop in the same function already does, and skip subranges with no value
there.
Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
[lldb] Fix OOB write in MultiMemRead response parsing (#226168)
Change some memory writes in ParseMultiMemReadPacket so that it no
longer asserts on OOB accesses, instead returning an error. This makes
the code correct even in release builds.
vm_page: Fix the error path in vm_page_alloc_contig_domain()
If we are inserting a run of pages into a VM object and fail at some
point due to a memory allocation failure, we have to free all of the
pages in the run. We do that by resetting some fields and calling
vm_page_free_toq() on each page; this removes the page from the object
and frees it back to the buddy allocator.
If the page is supposed to be wired, we reset the reference count, but
this was done incorrectly: the VPRC_OBJREF flag must be retained as the
page still belongs to an object. Resetting it to zero will cause a
panic in vm_page_free_prep(): vm_page_free_object_prep() will subtract
VPRC_OBJREF from the refcount, causing underflow, and
vm_page_free_prep() subsequently calls panic() if the refcount is
non-zero.
Reviewed by: alc, kib
Fixes: fee2a2fa3983 ("Change synchonization rules for vm_page reference counting.")
MFC after: 1 week
[2 lines not shown]
[WebKit Checkers] Do not report lambda captures in system headers (#226182)
This matches the policy in other WebKit checkers.
Some `std` namespace lambdas like `find` lack the `noescape` annotation,
so the borrow checker flags them.
Assisted-by: Claude
CodeGen: Trim each PHI source subregister lane at its own last read
This fixes verifier errors when LiveIntervals is computed in SSA.
Eliminating a PHI with LiveIntervals available, it shortens the live range
of the source register to its last read in the predecessor block, and shortened
each subrange to that same point. That is wrong when several PHIs read different
subregisters of the same source value: each lane's real last read is a different
one of the inserted copies, so trimming all of them at the last read of the whole
register leaves the earlier lanes live past their final use. The verifier rejects
this with "Instruction ending live segment doesn't read the register".
The per-lane read points cannot be recovered from the original live ranges, so
the new subreg copies need to be tracked.
Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
mips: tag all the stub functions as __noubsan
When built with UBSAN the stub functions change to the point that the
mips_fixup_addr code doesn't understand the instructions involved.
Apply __nousbsan to avoid this.
PR//60779: Kernel complains about unexpected mips insn on boot...
vmm(4): Do not access raw PSL_I
With SEV-ES enabled we can not directly access PSL_I in RFLAGS.
Instead we have to use the GUEST_INTR_MASK bit in vmcb->v_intr_shadow
which indicates the actual PSL_I state.
ok dv@ mlarkin@