Skip to content

Commit abfe719

Browse files
authored
inference: complete the inference even for recursive cycles (JuliaLang#56551)
We care more and more now that our inference graph exactly matches the callgraph, even in cases like this where we can easily prove that the inference graph is simpler than the full callgraph. However, given when the optimizer runs, it expects this information to be available and valid as soon as the cycles are completed.
1 parent c7206d9 commit abfe719

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/abstractinterpretation.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -583,14 +583,6 @@ function abstract_call_method(interp::AbstractInterpreter,
583583
if infmi.specTypes::Type == sig::Type
584584
# avoid widening when detecting self-recursion
585585
# TODO: merge call cycle and return right away
586-
if call_result_unused(si)
587-
add_remark!(interp, sv, RECURSION_UNUSED_MSG)
588-
# since we don't use the result (typically),
589-
# we have a self-cycle in the call-graph, but not in the inference graph (typically):
590-
# break this edge now (before we record it) by returning early
591-
# (non-typically, this means that we lose the ability to detect a guaranteed StackOverflow in some cases)
592-
return Future(MethodCallResult(Any, Any, Effects(), nothing, true, true))
593-
end
594586
topmost = nothing
595587
edgecycle = true
596588
break

0 commit comments

Comments
 (0)