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
loopification #868
loopification #868
Conversation
@shirouto Thanks for the PR! I imagined this is the appropriate place to enable loopification in -O0 (and up): https://github.com/typelead/eta/blob/master/compiler/Eta/Main/DynFlags.hs#L3489-L3526 What do you think? |
I thought about it, but since eta does not know where the |
It was observed that Core lint errors occur if the primops were not declared side-effecting because of thunk splitting in the worker-wrapper code.
I agree with the latter - the user should specify |
Well, I did the change to enable loopification by adding it to
and
are typical stack traces I ran into when running long series of monadic binds compiled with vanilla eta. Also in the repl, something like
|
This will require some benchmarking since they are such commonly used functions.
You mentioned a weird Go ahead and push up your change - I'll merge it. The other issues you brought up, we'll tackle one by one. |
|
Very well, I reset to master and pushed again with the new approach. I will open a separate ticket for the MVar stack trace. |
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.
Looks good @shirouto! Thanks.
Btw, please make sure to do a rebase for your PR when updating with master next time! |
Description
This addresses #866 by adding the "-floopification" flag to eta by default. Users can still turn off the optimization through CLI arguments, config, sandbox settings, or cabal file (there is another patch on etlas related to this that insures etlas calls to eta do not turn off the flag by default).
How Has This Been Tested?
Ran the available test harness and additional tests (yet to be submitted --- working on improving the test harness as in #865 and related to #847) to verify that the loopification optimization is applied by default in both eta and etlas.
Types of changes
Checklist: