-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[4.13] ocamlopt fails with "Fatal error: Liveness.fundecl" #10520
Comments
It looks like the Spilling phase produced wrong code on function |
I'm not sure I'll have time to debug this before going on holidays, but it seems that |
I'm on it, helped with copious printing code. The gist of the bug is that the newly-inserted polling points force spilling of the |
Actually, @lthls was mostly right. Spill code insertion correctly expects So, where's the bug? Dead code elimination runs before the polling insertion pass, and spill code insertion runs after. Inserting polling points adds new execution paths, since a poll can raise an exception! So it's wrong to eliminate dead code before inserting poll points. I'll fix this shortly, but right now I need a drink or three to forget these horrors. For reference, the Owl code that exhibits the error is of the following shape:
The poll point inserted in the inner Note the "elegance" of exiting a loop with a failed assertion. The imagination of our users has no limits. Note also that the original code is now wrong if an exception handler is installed and can raise an exception. |
Inserting poll point adds new control paths: a poll can raise an exception that is handled by a try...with in the same function. As ocaml#10520, this can invalidate optimizations performed before poll point insertion, such as dead code elimination. This commit moves the Polling pass just after the Selection pass, before all optimization passes. Fixes: ocaml#10520
Inserting poll point adds new control paths: a poll can raise an exception that is handled by a try...with in the same function. As ocaml#10520, this can invalidate optimizations performed before poll point insertion, such as dead code elimination. This commit moves the Polling pass just after the Selection pass, before all optimization passes. Fixes: ocaml#10520
Inserting poll point adds new control paths: a poll can raise an exception that is handled by a try...with in the same function. As #10520, this can invalidate optimizations performed before poll point insertion, such as dead code elimination. This commit moves the Polling pass just after the Selection pass, before all optimization passes. Fixes: #10520
Inserting poll point adds new control paths: a poll can raise an exception that is handled by a try...with in the same function. As #10520, this can invalidate optimizations performed before poll point insertion, such as dead code elimination. This commit moves the Polling pass just after the Selection pass, before all optimization passes. Fixes: #10520 (cherry picked from commit f203a5d)
Trying to install
owl-base.1.0.1
using the latest OCaml 4.13 (7a182bd) results in the following fatal error:Looking at the commits since the last check, I suspect it might be an issue in #10039 (backported in the 4.13 branch)
The text was updated successfully, but these errors were encountered: