Skip to content

Commit 956ca1a

Browse files
committed
[GR-59515] Invokes with 0 callees are not unreachable in open analysis.
PullRequest: graal/19188
2 parents 8f6226b + 3c89e46 commit 956ca1a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/results/StrengthenGraphs.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,11 @@ private void handleInvoke(Invoke invoke, SimplifierTool tool) {
589589

590590
Collection<AnalysisMethod> callees = invokeFlow.getOriginalCallees();
591591
if (callees.isEmpty()) {
592-
unreachableInvoke(invoke, tool);
593-
/* Invoke is unreachable, there is no point in improving any types further. */
592+
if (isClosedTypeWorld) {
593+
/* Invoke is unreachable, there is no point in improving any types further. */
594+
unreachableInvoke(invoke, tool);
595+
}
596+
/* In open world we cannot make any assumptions about an invoke with 0 callees. */
594597
return;
595598
}
596599
assert invokeFlow.isFlowEnabled() : "Disabled invoke should have no callees: " + invokeFlow + ", in method " + getQualifiedName(graph);

0 commit comments

Comments
 (0)