Conversation
|
(Marking as flambda-prerequisite until such time as @chambart may downgrade it. It needs removing from chambart/flambda_merge if that happens.) |
There was a problem hiding this comment.
Note that the only case where this matters with flambda is with loops when the first rounds is always runned
|
This looks correct to me. I'd still be interested in an example about the "for loop" unrolling requiring the simplification in if-then-else. I would have expected this optimization to be done at the flambda level. |
|
Hum sorry I looked at it a bit more and mixed something in my example. A more general transformation handling branches will be done at some point in flambda, but not in this release, and this small change allow to simply avoid some bad cases. By the way, I'm still not completely convinced that the recursive cases in test_bool By the way, there is no loop (for, while) unrolling at all in flambda. |
|
This is useful, but I wouldn't consider that a prerequisite, hence I removed the tag. |
|
OK for merging. |
|
@damiendoligez : @chambart himself does not seem completely sure that this proposal cannot degrade some cases. Shouldn't we apply some care before merging? |
|
If we're worried about this, maybe what we should do is wait until a quiet time (maybe at a weekend) and then merge this. OCamlPro's benchmark suite should be able to detect any noticeable regressions. |
|
OK for merging after getting some evidence that it doesn't degrade performance, or after removing the recursive cases. Or, @chambart what do you think of postponing to 4.04? |
|
It is not on my repository, so I can't change it, but I would be in favor of taking the obviously beneficial case and wait for 4.04 to have some time to test and think about the rest. |
|
@chambart Just make a new pull request that reverts the bit you want to keep back... |
|
I'll re-approved when the changes are made. |
Avoid pushing test deep inside conditions
|
@chambart Please confirm the diff now looks correct (I merged your PR on my repo and fixed a conflict). @damiendoligez Please approve. |
|
@chambart Just waiting for your approval too |
|
This looks ok now. |
GPR#430: if-then-else changes in Cmmgen
Add a test to exercise stored continuations and the garbage collector
Co-authored-by: tmattio <tmattio@users.noreply.github.com>
I'm going to leave @chambart to comment on this.