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

Inline common operators #43

Open
felixSchl opened this issue Oct 10, 2018 · 1 comment
Open

Inline common operators #43

felixSchl opened this issue Oct 10, 2018 · 1 comment
Labels
enhancement New feature or request optimization

Comments

@felixSchl
Copy link
Collaborator

Implement an equivalent for the inlineCommonOperators pass in PureScript.

https://github.com/purescript/purescript/blob/master/src/Language/PureScript/CoreImp/Optimizer/Inliner.hs#L109

I think a good few hours can be sunk into this one alone, but will be worth it. We should be able to apply the extra optimization of unboxing literals where applicable or even statically computing results where applicable. For reference, see: https://github.com/pure-c/pure-c/blob/cb4c6ffad5af96928c5934ea29138fbb9ae708a3/src/Language/PureScript/CodeGen/C/Optimizer/Inliner.purs#L222-L242

@felixSchl felixSchl added enhancement New feature or request optimization labels Oct 10, 2018
@felixSchl
Copy link
Collaborator Author

Note that this transform is required at least for apply and applyFlipped in order for TCO to kick in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request optimization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant