Recomputes byte offsets for all labels and instructions in the AST from
scratch, in node order. Called after any pass that alters the node list so
there is a single authoritative place that assigns offsets.
Makes eBPF’s ALU32 zero-extension hold under SBPF, where add32, sub32 and
mul32 sign-extend. Each such instruction is kept, promoted to its 64-bit form,
or zero-extended. Assumes the AST follows eBPF semantics (LLVM output).
Runs every CFG optimization on a single CFG built from the AST, then writes
the result back once: dead-function elimination, then the ALU32 extension
fix-up.
Like optimize, and exposes the CFG before and after dead-function
elimination. The observer owns any optional diagnostics or I/O, keeping the
passes themselves pure.