Skip to content

derive and expose address keyed GP register liveness - #1

Closed
leftbyte wants to merge 4 commits into
dphung/pir-req2-flag-livenessfrom
dphung/pir-req3-register-liveness
Closed

derive and expose address keyed GP register liveness#1
leftbyte wants to merge 4 commits into
dphung/pir-req2-flag-livenessfrom
dphung/pir-req3-register-liveness

Conversation

@leftbyte

Copy link
Copy Markdown
Owner

This PR is stacked on top of static-analysis-engineering#289.

Same mechanism as PR static-analysis-engineering#289, applied to general-purpose registers: derives register live-in/live-out per instruction address from the reaching-def facts. Gives a sound answer to "which registers are live across this point".

This metadata is used in the patcher's predicated-if register-safety check to fall back to a (register-safe) trampoline when the in-place body would clobber a register live at the region exit.

Dan Phung and others added 4 commits August 6, 2026 18:53
Extend ASTILiveness with register_liveness, computing GP-register
live-in/live-out per instruction address from the per-instruction
reaching-def facts (restricted to the architecture register set to exclude
spill slots and stack temporaries), reusing the shared use/kill and
backward-fixpoint engine already used for flag-liveness.
Add a register-liveness map (keyed by instruction address) to
ASTProvenance with the standard getter/setter, and round-trip it through
serialize/deserialize alongside the other provenance facts.
Compute register-liveness in mk_asts, alongside set_ast_provenance and the
flag-liveness computation, so it flows through the same builder path as the
other provenance facts. The computation is auxiliary and guarded so a
failure cannot abort AST generation.
@leftbyte leftbyte self-assigned this Aug 20, 2026
@leftbyte leftbyte changed the title Dphung/pir req3 register liveness derive and expose address keyed GP register liveness Aug 20, 2026
@leftbyte leftbyte closed this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant