Skip to content

Conversation

jserv
Copy link
Collaborator

@jserv jserv commented Aug 25, 2025

This reduces the number of basic block traversals in liveness_analysis() from two to one by combining bb_reset_live_kill_idx and bb_solve_locals into a single bb_reset_and_solve_locals() function.

  • Eliminates one complete CFG traversal per function
  • Reduces function call overhead from repeated traversals
  • Improves cache locality by visiting each basic block once

It results in 10% reduction in total traversal calls during compilation.

This reduces the number of basic block traversals in liveness_analysis()
from two to one by combining bb_reset_live_kill_idx and bb_solve_locals
into a single bb_reset_and_solve_locals() function.
- Eliminates one complete CFG traversal per function
- Reduces function call overhead from repeated traversals
- Improves cache locality by visiting each basic block once

It results in 10% reduction in total traversal calls during compilation.
@jserv jserv merged commit 44b5746 into master Aug 26, 2025
12 checks passed
@jserv jserv deleted the improve-liveness branch August 26, 2025 19:01
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.

2 participants