nx_regalloc_liveness_diag.nx
buildroot/runtime/nx_regalloc_liveness_diag.nx
about
nx_regalloc_liveness_diag.nx -- BITS-UP DIAGNOSTIC for the disabled
compute_liveness. Builds the exact CFG shape build_intervals under-
approximates: a value defined in the entry, USED in a loop HEADER, and
NOT used after the loop. The back-edge (body -> header) makes the value
live across the body, but its last LINEAR use is in the header (which
precedes the body in block order), so build_intervals' def-to-last-use
range stops too early -> linear-scan would think the register is free in
the body -> clobber. compute_liveness must extend the interval across the
body. This test EXECUTES the allocator (does not execute the built IR);
it isolates the correctness question with ZERO blast radius to the
self-hosting backend.
Exit 0 = both facts confirmed (build_intervals too short; compute_liveness
correct). Nonzero = where it diverged (see codes).
license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_types.nxnx_ir.nxnx_regalloc.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const K_MAGIC_4096: i64 = 4096 |
functions
| 23 | func main() -> i64 |