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 inlining heuristics #15

Open
chc4 opened this issue Sep 12, 2021 · 1 comment
Open

Implement inlining heuristics #15

chc4 opened this issue Sep 12, 2021 · 1 comment

Comments

@chc4
Copy link
Owner

chc4 commented Sep 12, 2021

Right now Lineiform just tries to inline every call unconditionally. This is pretty stupid. Most JITs use some combination of current function size, CFG complexity, and target function size to decide if it should inline a call or not, and we'd like to do the same. This is slightly hampered in that we don't have an CFG building pass, but we do have target function size from the symbol.

@chc4
Copy link
Owner Author

chc4 commented Sep 12, 2021

This should probably be user-configurable in some way? Maybe we allow the user to set a closure as the heuristic that we call? Idk realistically I don't really know what's good inlining or not until we have a bunch of benchmarks and can twiddle knobs to see what goes fast or not.

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