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

Unpack TCO loops #18

Open
natefaubion opened this issue Aug 29, 2022 · 0 comments
Open

Unpack TCO loops #18

natefaubion opened this issue Aug 29, 2022 · 0 comments

Comments

@natefaubion
Copy link
Collaborator

natefaubion commented Aug 29, 2022

It would be nice to unpack TCO loops, such that TCO arguments that are always known constructors don't need allocations. This would give us something comparable to call-pattern-specialization in the TCO pass. We essentially already do this for mutually recursive TCO bindings, as a special case.

It doesn't strictly need to be a TCO pass, as it would obviously be nice to have this even when the backend doesn't need TCO. It just seems like a straightforward extension for now.

Additionally, by doing it as part of codegen, we can avoid an explosion of specialized bindings (one for every specialization of constructors).

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

No branches or pull requests

1 participant