resterm: Update to 1.16.0
New RestermScript helpers
Standard library names without rts.
Stricter null handling
+ on lists and dictionaries
@use and @setting stay in their request
Clearer error messages
[CIR] Fix a handful of hwasan issues/sanitizer found issues in CIR (#234294)
The hwasan bot found quite some issues with how we were managing
contexts/memory throughout.
First, CIRAction doesn't need an MLIRContext at all, and was never being
passed one, so it would always construct one, then never erase it.
Second in CIRGenModule, the module is non-owning, so we need to make
sure we erase it at the end of the module.
Third, when generating the global view for a vptr, we were creating an
operation with the intent of 'stealing' from it, but never ended up
adding it anywhere, so it would be lost.
Forth, we had a few uses of getAddrOfGlobalVar that were causing an
extra getglobalop when they really just needed the global itself. That
caused those to never be emitted right either.
Finally, an issue in PointerLikeTest caused us to leak a ConstantOp, wh
ich this patch properly wraps in the OwningOpRef.
[CloneFunction] Keep fast-math flags on constrained intrinsic calls (#231860)
PruningFunctionCloner converts FP operations to constrained intrinsics
when the host function is strictfp, but drops their fast-math flags in
cloneInstruction().
Copy them to the new call.
dsl_crypt: only expect an IVset guid on snapshots
dsl_crypto_populate_key_nvlist() looks up DS_FIELD_IVSET_GUID on the
dataset being sent and asserts that a missing one means the pool has
the ZOL_8308 errata. Only snapshots get an IVset guid, though, and a
raw send of an unmounted encrypted file system, or zdb -B of its
objset, sends the head dataset, so debug builds panic (zdb aborts) on
'zfs send -w pool/fs'. Release builds send with to_ivset_guid 0.
Only assert for snapshots.
This makes cli_root/zfs_send/zfs_send_raw pass.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Closes #19018
Closes #19310
ZTS: test raw sends of an encrypted file system
zfs_send_raw only raw-sends snapshots of the encrypted dataset. Also
raw-send the unmounted file system itself, with zfs send and with
zdb -B, which takes a head dataset's objset id.
This fails now: a file system has no DS_FIELD_IVSET_GUID, which only
snapshots get, and dsl_crypto_populate_key_nvlist() asserts that its
absence means an errata pool, so debug builds panic (zdb aborts).
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Issue #19018
Closes #19310
fix: [CIR] Check only the converted pointer's address space
Limit opaque pointer conversion to its own address space and diagnose unsupported pointee types where their layout is required. Emit type-specific errors for failed pointer conversions.
Validate pointee memory conversion before deriving copy sizes, alignments, or pointer-difference strides from CIR layout. Keep deeper pointee types opaque when their layouts are not needed.
Assisted-by: Codex / GPT-6
[CIR] Reject language address spaces in DirectToLLVM pointer conversion
Reject unlowered language address spaces in pointer types when bypassing TargetLowering. Guard pointer-producing lowerings, including generated patterns, so failed conversions report legalization failures instead of silently selecting address space zero or constructing invalid LLVM operations.
Assisted-by: Codex / GPT-6
[CIR] Propagate initializer type adjustment failures (#224238)
Reject initializers whose active members have no LLVM representation,
including when an enclosing union's storage type is convertible.
Propagate recursive adjustment failures before querying data layout or
constructing LLVM operations.
Assisted-by: Codex / GPT-6
libzfs: don't require keylocation when receiving an encryption root
recv_fix_encryption_hierarchy() restores the keylocation of a received
encryption root from the stream's properties with
fnvlist_lookup_string(), which aborts if it is missing. 9a02e53ad
handled streams with no properties at all, but a 'zfs send -b' stream
carries only received properties, and keylocation is usually a local
property of a raw-received encryption root, so receiving such a stream
still aborts zfs receive after the data has been received.
Restore the keylocation only if the stream carries it. The raw
receive has already set a usable one.
This makes cli_root/zfs_receive/zfs_receive_raw_-b pass.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Closes #17011
Closes #19309
ZTS: test receiving a 'send -b -w -R' stream of an encryption root
Replicate an encrypted file system raw to a backup, then send the
backup with 'zfs send -b -w -R' and receive it into another dataset.
A '-b' stream carries only received properties, which do not include
keylocation for the raw-received encryption root. The receive must
succeed, and the restored dataset must be an encryption root whose key
loads with the original passphrase.
This fails now: zfs receive aborts in fnvlist_lookup_string() when
recv_fix_encryption_hierarchy() looks up keylocation.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Issue #17011
Closes #19309
[BasicBlockSections] Ignore debug-only blocks in landing-pad checks (#219749)
Fixes #219671.
`avoidZeroOffsetLandingPad()` used raw `MachineBasicBlock::empty()`, so
a
debug-only instruction made an otherwise code-empty block count as the
first
non-empty block in a section. This changed `CurrentSection` before the
landing
pad was visited and suppressed the NOP required to prevent a zero-offset
landing pad.
Use `getFirstNonDebugInstr()` when determining whether a block
contributes
code. Its default behavior also ignores pseudo probes, which do not emit
bytes
into the function's text section.
[12 lines not shown]
[AMDGPU] Use canonical syntax for inline asm in CodeGen tests (#234279)
Write the inline asm in these tests the way the assembler prints it:
with the encoding suffix (v_mov_b32 -> v_mov_b32_e32, v_mov_b16 ->
v_mov_b16_e32, v_cvt_f32_f64 -> v_cvt_f32_f64_e32, v_cmpx_le_u32 ->
v_cmpx_le_u32_e64, v_cmp_gt_i32 -> v_cmp_gt_i32_e64), the real name
instead of an alias (v_accvgpr_write -> v_accvgpr_write_b32), commas
between all operands, and hex for 100. The encodings are unchanged.
llc currently copies inline asm into textual output as written, but
with the integrated assembler it is parsed and printed in canonical
form. Writing it canonically keeps these checks the same either way.
Also replace v_add_i32_e32 in inline-asm.ll, which does not exist on
the gfx802 RUN line, with v_add_f32_e32, and check that llc's output
for inline-asm.ll assembles with llvm-mc.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Finally delete LiveVariables
This is about 12 years overdue.
The extra workaround run in PPC was last removed in #222416, but
reverted by #225816. There was never a reproducer or specific patch to
fix this, though it's possible the now consistent dead flag handling
fixed or at least hid the LiveRangeCalc error.
Remove create_dataset from sharing.s3.create
Before: `create_dataset`, default true, decided whether the dataset was
created, and a BUCKET bucket could take an empty existing dataset.
Now: the layout decides. A BUCKET bucket always creates its dataset
and refuses an existing one. A DATASET bucket requires `dataset` and
takes it as it is. The existing-dataset validation loses the BUCKET
branch, the property checks and the emptiness check.
Tests: the two existing-dataset tests in test_s3_bucket.py go back to
the one refusal. The whole-dataset tests no longer send the field.
[NVPTX] Add Custom ABI (abi_preserve) support via function attributes (#227499)
Adds support for the abi_preserve and abi_preserve_control performance
tuning directives, which specify how many general purpose and control
registers the callers of a function are responsible for preserving.
These are modeled as function and callsite attributes:
"nvvm.abi_preserve"="8"
"nvvm.abi_preserve_control"="3"
On a function they describe that function's contract and are emitted on
its definition and declaration. On a callsite they are appended to the
generated .callprototype, which is how an indirect call -- having no
callee to consult -- states the contract. The attributes are looked up
on the callsite only, never inherited from the callee.
PTX ISA documentation:
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#performance-tuning-directives-abi-preserve,
[6 lines not shown]
SystemZ: Replace AEXT128/ZEXT128/PAIR128 pseudos with patterns
These pseudos only existed because GR128 values were untyped, so the
REG_SEQUENCE they expand to could not be written as a pattern. Now that
GR128 holds v2i64, select the extensions with REG_SEQUENCE output
patterns, and build GR128 pairs with a PAIR128 target node instead of a
custom inserter.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
SystemZ: Make v2i64 legal on subtargets without vector support
Without the vector feature, the GR128 even/odd register pairs were
modeled with MVT::Untyped, since no 128-bit type was legal. Use v2i64
instead, which is what the pairs functionally are.
v2i64 values can be built from and split into their halves with
subregister operations. Everything else is expanded. Loads and stores
are split into i64 halves, so they don't tie up a register
pair. Bitcasts to and from f128 use the FPR pair halves.
This takes care to avoid changing the calling convention. Vectors that
would be broken down into v2i64 are still passed as individual i64
elements. Inline assembly operands still use untyped, which is listed
first in the GR128 type list, so i128 operands are not bitcast to
v2i64.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
SystemZ: Add baseline tests for i64 vector handling
Make sure nothing changes in future changes. Cover the ABI of other
i64-element vector types and a range of <2 x i64> operations on a
subtarget without the vector facility.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeadMIElim: Require SSA (#234199)
Require SSA for DeadMachineInstructionElim. This is only used in the
SSA pipeline. The only test using a non-SSA run is apparently testing
LiveIntervals preservation, which it does not use or preserve.
Test device weights at the TARGET boundary
KIND's weight depends on the depth of the construct context, which
starts at the innermost enclosing TARGET. A PARALLEL outside the TARGET
must not raise it, and a PARALLEL inside must.