Files
metal2vulkan/crates
Anees Iqbal 674cf321a9 Provenance: an aggregate that stays a value, and a whole-slot zero fill beside run-time-indexed pointers, keep a cell closed
What: two rules of the pointer-cell verification (memory/provenance/cells.rs).
- An insertvalue whose aggregate stays a value (its every use, and every use of each aggregate
  built on it, is an extractvalue, the aggregate operand of an insertvalue, or an incoming value
  of a phi of such aggregates) no longer opens the allocas of the pointer it inserts. Provenance
  already reads each extractvalue through its insertion chain as the inserted pointer, and the
  arith family forwards it, so the pointer's accesses are the extraction's, which the walk sees.
- A zero fill beside pointer accesses at an unknown offset keeps the cell closed when every such
  access lies at a multiple of the pointer's size (its offset's proven alignment) and so does each
  end of the fill; exact slots must still be covered wholly or not at all. A load at an unknown
  offset already reads null wherever the cell has zero bytes.

Why: a thread's array of entry buffer pointers stayed an open cell in two shapes, and under the
identity domains a static buffer pointer stored into an open cell is refused
(Unsupported{Lowering(Access)} from pointer::store_pointer, which takes only a buffer destination).
Closed, each element holds its static fat pointer (root, offset) and each access through a loaded
element switches among the slots stored there, the form an array of buffer pointers indexed at run
time already took: no device address, the same form on every device. In the private corpus's
census (runtime-floor) this was 6 functions in 2 libraries: 4 that put the array's address into an
array_ref of a struct passed by value to inlined helpers (refused under every specialization: the
real-make rows), and 2 that zero the array with a memset beside a loop that loads, moves and stores
back an element at a run-time index (plain census only; their specializations translate). The
other route, storing the static pointer's address into the open cell, would make each loaded
element a device address; it is not taken.

How verified: the owned kernel_buffer_pointer_arrays' by-value and zero-filled kernels were refused
at the guest rows' site at the parent (CLI on runtime-floor and gate-lavapipe, m3-max-70315; the
test, m3-max-70329) and compile, pass L3 and compute Metal's words on the CPU interpreter on every
identity profile here (m3-max-70341); the plain array kernel compiled before and after. Lint:
fmt, clippy (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd), workspace Rustdoc (m3-max-70346). The
translator suites, the census and the golden cells that move are in the SEMANTICS commit's body.
2026-11-23 00:38:00 -08:00
..