You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance register allocation with usage-based spill
Building on the VReg abstraction, this commit adds intelligent spill
decisions based on variable usage patterns and context.
- Track variable lifetime with first_use, last_use, and use_count
- Add loop_depth field for identifying loop-resident variables
- Transform spill cost from simple distance to multi-factor heuristic:
* Loop variables: +200 cost per nesting level
* Usage frequency: +5 cost per use
* Live range length: +20 for long ranges
* Constants: -50 (prefer spilling for rematerialization)
0 commit comments