Skip to content

zjit: precompute caller-saved register survivors - #1080

Open
efegokdemir wants to merge 1 commit into
Shopify:masterfrom
efegokdemir:fix/zjit-caller-saved-regs
Open

efegokdemir wants to merge 1 commit into
Shopify:masterfrom
efegokdemir:fix/zjit-caller-saved-regs

Conversation

@efegokdemir

Copy link
Copy Markdown

Fixes #1075

Precompute CCall survivor sets by matching sorted call positions against live ranges, avoiding a full virtual-register scan for every call while retaining stack-map-only survivors.

Tests:

  • cargo test --manifest-path ../zjit/Cargo.toml --features=disasm,runtime_checks backend::lir::tests::test_call -- --exact --test-threads=1
  • cargo test --manifest-path ../zjit/Cargo.toml --features=disasm,runtime_checks backend::lir::tests::test_caller_saved_reg_survivors -- --exact --test-threads=1
  • cargo clippy --manifest-path zjit/Cargo.toml --all-targets --all-features

Match call sites against live ranges once instead of rescanning every interval for each CCall.

Fixes Shopify#1075
@github-actions github-actions Bot added the jit label Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZJIT: handle_caller_saved_regs is slow (quadratic in # vregs)

1 participant