-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
post-opt analysis bug: wrongly refine :consistent
of Base._getindex(::Base.OneTo{Int}, ::Int)
#53508
Comments
Why is the analysis wrong? The return value does not depend on the |
Doesn't So I guess this is a bug of |
Ah yes, fair point. I did write that in the spec, but then I forgot about it ;). |
(Though I have been thinking that maybe the two notions of value consistency and termination consistency ought to be separated, but we should fix this at least. |
I'm in favor of the separation. |
Previously `conditional_successors_may_throw` performed post-domination analysis not on the initially specified `bb` (which was given as the argument), but on those BBs being analyzed that were popped from the work-queue at the time. As a result, there were cases where not all conditional successors were visited. fixes #53508
Previously `conditional_successors_may_throw` performed post-domination analysis not on the initially specified `bb` (which was given as the argument), but on those BBs being analyzed that were popped from the work-queue at the time. As a result, there were cases where not all conditional successors were visited. fixes #53508
Previously `conditional_successors_may_throw` performed post-domination analysis not on the initially specified `bb` (which was given as the argument), but on those BBs being analyzed that were popped from the work-queue at the time. As a result, there were cases where not all conditional successors were visited. fixes #53508
…ang#53518) Previously `conditional_successors_may_throw` performed post-domination analysis not on the initially specified `bb` (which was given as the argument), but on those BBs being analyzed that were popped from the work-queue at the time. As a result, there were cases where not all conditional successors were visited. fixes JuliaLang#53508
…ang#53518) Previously `conditional_successors_may_throw` performed post-domination analysis not on the initially specified `bb` (which was given as the argument), but on those BBs being analyzed that were popped from the work-queue at the time. As a result, there were cases where not all conditional successors were visited. fixes JuliaLang#53508
From https://discourse.julialang.org/t/trying-to-understand-inferred-effects/110854.
Base._getindex(::Base.OneTo{Int}, ::Int)
is expected to be!:consistent
since it does have@boundscheck
, yet post-optimization analysis erroneously refines it as:consistent
. Specifically, the post-optimization analysis ofBase._getindex(::Base.OneTo{Int}, ::Int)
does the refinement with analyzingall_retpaths_consistent=true
(julia/base/compiler/optimize.jl
Line 651 in 71f68b4
GotoIfNot
whose condition isExpr(:boundscheck)
, that analysis is wrong.The underlying issue may reside in the
lazyagdomtree
logic, necessitating a deeper understanding of the code's purpose.julia/base/compiler/optimize.jl
Lines 840 to 851 in 71f68b4
/cc @Keno
The text was updated successfully, but these errors were encountered: