Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement register spilling #24

Open
GoogleCodeExporter opened this issue Apr 23, 2015 · 2 comments
Open

Implement register spilling #24

GoogleCodeExporter opened this issue Apr 23, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Compiling a function like (define (foo) (list 1 2 3 4 ... n)) easily causes 
register starvation. This is because while register retargeting tries to switch 
loads and stores to point to good registers, it does not actually try to limit 
the number of registers in use. In the above mentioned function all values are 
naturally in 'good' positions since they need not be moved anywhere, and end up 
taking ~O(2n) registers.

Should add a register limit to the retargeting pass to force them to be moved 
do free lower registers, and while we're at it, reduce the number of VM 
registers. Should also add register spilling (by storing them to tuples 
resembling environments), and more generally rewrite the whole compiler, as it 
seems to be pretty old and ugly code.

Original issue reported on code.google.com by aohelin on 5 Dec 2010 at 3:44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant