-
Notifications
You must be signed in to change notification settings - Fork 39
Tail Recursion Optimization #358
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
Conversation
LPTK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! I'm very excited to have this in, as it's a first step towars our eventual goal of KICE (Know In-order Call Elimination).
|
When did we establish this |
Just now 😎 |
|
OK, turns out I didn't recompile some of the other stuff. Please wait EDIT: Should be good now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think this is almost ready to merge. But let's try to not create useless while loops (see comment below)!
|
Done |
LPTK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, LGTM now, thanks!
Implements tail recursion optimization. Also changed the lifter, handler lowering, and while loop rewriter to properly propagate functions' TermSymbols into calls.
Note that the lifter has been modified so only disambiguated references to BMS's are rewritten. This should not be a problem as all references to nested functions should be disambiguated. However, it may cause errors if passes before the lifter forget to propagate the disamb symbols.
Things that are not yet done: