OpenMP: Use getOrInsertFunction init callback for runtime functions
Use the new overload to set up the function on first use. The
MD_callback check is dropped since a newly created function will never
have metadata.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
IR: Look up PassInstrumentation once when erasing invalidated results
AnalysisManager::invalidate looked up the cached PassInstrumentation
result for each erased result. It is never invalidated, so look it up
once.
Whole O3 instructions (callgrind): kimwitu++ k.bc -0.27%, SPASS cnf.bc
-0.05%, sqlite3 -0.02%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Check that nvmet test connections leave no host subsystem behind
After disconnecting, connect_ctx and connect_all_ctx now wait for the
host to drop the subsystem(s), and fail with fuser/holders output if it
doesn't. A leak then fails the test that caused it, not every later test
that checks for a clean host.
AMDGPU: Use LastSubtargetCache in getSubtargetImpl
Reuse the last subtarget for functions with the same function
attribute set and module, or the same subtarget relevant attributes
and module flags, instead of building the subtarget key. This is
faster and works towards all targets using a common pattern.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
AMDGPU: Add test for m0 kill flags after merging inits
hoistAndMergeSGPRInits extends the live range of m0 across blocks,
which requires clearing kill flags but nothing tested this.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Allocate LiveIntervals ranges with BumpPtrAllocator
LiveInterval and register unit LiveRange objects were individually
heap allocated and freed. Allocate them from a BumpPtrAllocator owned
by LiveIntervals, with recyclers so removed intervals and register
unit ranges reuse their storage. The arena is reset in clear(),
keeping the first slab across functions.
Reduces llc instructions by ~0.3% on the 40 largest CTMark TUs for
x86_64 and arm64. The impact is larger for amdgpu.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[llvm][LowerTypeTests] Drop MD_vcall_visibility with typetests (#241597)
When compiling FatLTO objects with -fvirtual-function-elimination,
FatLTOCleanup removes llvm.type.checked.load intrinsics after embedding
the pre-link bitcode section.
Because FatLTOCleanup lowered llvm.type.checked.load without removing
!vcall_visibility metadata, and DropTypeTestsPass only erased the
metadata if type test or checked load intrinsics were still present in
the module. Because of this, vtables retained !vcall_visibility during
non-LTO compilation. When GlobalDCE ran later in the pipeline, it saw
!vcall_visibility with no remaining llvm.type.checked.load calls and
incorrectly zeroed out live virtual function slots in the native object.
This patch updates cleanUpTypeCheckedLoad and dropTypeTests to erase
!vcall_visibility metadata whenever checked loads or all type tests are
dropped. This keeps the behavior uniform for both FatLTO and existing
usage of the LowerTypeTestsPass
[2 lines not shown]
18449 zvol DKIOCFREE is unbounded and can time out the initiator
Imported from: OpenZFS 65282ee9ef4c594da9ec4afd27f9dfc5c4a0
Portions contributed by: Alek Pinchuk <apinchuk at datto.com>
Portions contributed by: Tom Caputi <tcaputi at datto.com>
Portions contributed by: Olivier Mazouffre <olivier.mazouffre at ims-bordeaux.fr>
Portions contributed by: Chunwei Chen <david.chen at nutanix.com>
Reviewed by: Matthew Ahrens <matt at mahrens.org>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>
RISCV: Migrate to LastSubtargetCache in getSubtargetImpl
These already reused the last subtarget for functions with the same
function attribute set. Use LastSubtargetCache to additionally filter
to the subtarget relevant attributes and work towards all targets
using a common pattern.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
ARM: Use LastSubtargetCache in getSubtargetImpl
Reuse the last subtarget for functions with the same function attribute
set and module, or the same subtarget relevant attributes, float ABI
and ABI, instead of building the subtarget key. This works towards
all targets using a common pattern.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Optimize cpu_switchto()'s handling of restartable atomic sequences:
- We can us any callee-saved register we want, since we've already
saved them in the outgoing PCB, so so this to avoid having to
re-load curlwp, etc. from memory. This let's us to eliminate a
branch target.
- ras_lookup() returns a pointer in %a0, but also returns the same
value in %d0. We don't care about the pointer-ness of the return
value, so just use the %d0 return and shave off several insns.
18637 zfs send leaks uninitialized stack bytes in WRITE_EMBEDDED records
Imported from: OpenZFS f3f5263f8a9b0f8b51051698f68fbd76e181a685
Portions contributed by: Richard Yao <richard.yao at alumni.stonybrook.edu>
Reviewed by: Ryan Moeller <ryan at iXsystems.com>
Reviewed by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed by: Matthew Ahrens <matt at mahrens.org>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>
AArch64: Migrate to LastSubtargetCache in getSubtargetImpl
These already reused the last subtarget for functions with the same
function attribute set. Use LastSubtargetCache to additionally filter
to the relevant subtarget relevant attributes and work towards all
targets using a common pattern.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Skip SPDK host links for subsystems not visible on standby
On the HA standby node, non-ANA subsystems are not created, but
NvmetHostSubsysConfig still tried to add their allowed hosts, which SPDK
rejected with -32602 (Invalid parameters). Apply the same subsys_visible()
check used for subsystems, bdevs and namespaces.
X86: Reuse the last subtarget for functions with same attributes (#242208)
Add a utility for caching subtarget lookups. This returns the last
subtarget without building the subtarget key if the function has the
same attributes or same subtarget-relevant attributes as the last
query. RISCV and AArch64 already do something similar, and this
utility should be adopted across the targets (customized to the
relevant attributes). Also find the subtarget attributes in one
scan.
CTMark instructions executed, geomean: O3 -0.26%, ThinLTO -0.26%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
AMDGPU: Add named ArgRange classes for common builtin operands
Name the ranges shared by many builtins after the operand they
constrain: byte/word select indexes, scale_sel, f8f6f4 matrix formats,
and wmma neg flags on variants that do not support negation. NFC.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>