[NFCI] Replace getAllocatedType with tracked value type in RewriteStatepointsForGC (#177440)
The allocas in RewriteStatepointsForGC are created with
LiveValue->getType(), so we can use Def->getType() (which equals the
alloca's type) instead of querying getAllocatedType().
Changes:
- Load instructions now use Def->getType() directly
- The ToClobber vector now stores (Type*, AllocaInst*) pairs to track
the original value's type for creating null constants
Co-authored-by: Claude Opus 4.5 <noreply at anthropic.com>
[FunctionSpecialization] Remove getAllocatedType() type check (#177439)
Change getConstantStackValue() to check the type of the promoted
constant rather than the alloca's declared type. This is more correct
semantically since we're interested in the actual stored value's type,
not what the alloca was declared as.
The change also handles type punning cases more conservatively - if an
alloca is declared as i64 but stores a float, the old code would pass
the integer type check but potentially return a non-integer constant.
The new code correctly rejects such cases.
Also remove a bit of dead code, since the argument is a pointer type, it
cannot also have been a constant integer (and this code would be wrong
if it was reachable). Originally introduced as dead code in
https://reviews.llvm.org/D10642630fbb06979077740961ebc46853e28ab1f999f9d.
Co-authored-by: Claude Opus 4.5 <noreply at anthropic.com>
[InstCombine] Replace getAllocatedType() with getAllocationSize() (#177435)
Replace uses of getAllocatedType() with the more semantic
getAllocationSize() method in the alloca dereferenceability check
and zero-size alloca merging logic.
This simplifies the code by:
- Eliminating manual isArrayAllocation() checks (handled by
getAllocationSize)
- Eliminating superfluous isSized() checks (the verifier rejects them
already)
- Using TypeSize::isScalable() for scalable vector handling (before
casting to uint64_t)
- Using TypeSize::isZero() for zero-size checks
Co-authored-by: Claude Opus 4.5 <noreply at anthropic.com>
Revert "textproc/libxml2*: update to 2.15.1, split -core"
The design of this update was repeatedly rejected in the linked PR
with a prescribed different design. This commit is therefore
unauthorised.
This reverts commit 099bd713e09ebdd02d73fde770c50706f980404f.
With hat: desktop (textproc/libxml2), gnome (USES=gnome)
PR: 291316
Make sure we can still write data to txg
The final txgs are used only to clear out any remaining deferred
frees, and we cannot write new data to them. Make sure we do not
try to do so.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Mariusz Zaborski <mariusz.zaborski at klarasystems.com>
Closes #18139
Lock db_mtx around arc_release() in couple places
* Lock db_mtx around arc_release() in dbuf_release_bp()
While this function is called only in sync context, the same buffer
can be touched by dbuf_hold_impl() in open context, creating races.
All other accesses to arc_release() are already protected by db_mtx,
so just take it here too.
Signed-off-by: Alexander Motin <alexander.motin at TrueNAS.com>
* Lock db_mtx in sa_byteswap()
While SA code seems protected by sa_lock, there is a back door of
dmu_objset_userquota_get_ids(), that may hold and access the dbuf
without sa_lock, relying only on db_mtx. Taking db_mtx here should
protect both the arc_release() and the data for db_buf.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
[2 lines not shown]
[CIR] Add support for member pointer constants (#178074)
This adds support for initializing global variables of type
pointer-to-member that pointer to member functions.
[CIR] Upstream support for pointer-to-method casts (#178004)
This adds support in CIR for handling based-to-derived and
derived-to-base casts of pointer-to-member values that point to member
functions.
Co-authored-by: Sirui Mu <msrlancern at gmail.com>
[AMDGPU] Pre-GFX10 does not need added latency for workgroup fences (#177157)
Wait counts will not typically be introduced for workgroup scope fences
in pre-GFX10 ASICs.
Hence avoid adding scheduling latency for these.