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

Serialize chains, not funclets #26

Open
od0x0 opened this issue Feb 11, 2023 · 0 comments
Open

Serialize chains, not funclets #26

od0x0 opened this issue Feb 11, 2023 · 0 comments
Labels
core Essential (planned) functionality or maintenance deferred

Comments

@od0x0
Copy link
Collaborator

od0x0 commented Feb 11, 2023

This is probably something we can defer. It's not urgent, and would make more sense as part of a broader cleanup of the code for control flow.

Inlining joins is generally the preferred mode of joins, since it lets you emit clean(er) rust code that doesn't touch the join stack. Generally, you only ever want to create a serialized join if you're going to cross a yield boundary.

However, if you cross a yield boundary with a bunch of inlined joins in the compiler's stack, it implicitly converts them to serialized joins and does so on a per-funclet basis. The result is a long string of inlined code, followed by a chain of unexpected tiny joins.

Really, codegen should merge these inlined joins and put them on a queue. This would entail a few parts of the codegen needing to think in terms of funclet chains and not individual funclets, though.

@od0x0 od0x0 added core Essential (planned) functionality or maintenance deferred labels Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Essential (planned) functionality or maintenance deferred
Projects
None yet
Development

No branches or pull requests

1 participant