Skip to content

Commit 75aeb90

Browse files
committed
Small fix in schedule phase when checking for existence of floating guard nodes.
1 parent 2c98ca5 commit 75aeb90

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/schedule/SchedulePhase.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ public void add(Node node) {
843843
* Number of nodes in this micro block.
844844
*/
845845
public int getNodeCount() {
846-
assert getActualNodeCount() == nodeCount : getActualNodeCount() + " != " + nodeCount;
846+
assert getActualNodeCount() == nodeCount;
847847
return nodeCount;
848848
}
849849

@@ -940,7 +940,7 @@ private void scheduleEarliestIterative(BlockMap<List<Node>> blockToNodes, NodeMa
940940
}
941941
}
942942

943-
if (graph.getGuardsStage().allowsFloatingGuards() && graph.getNodes(GuardNode.TYPE).isNotEmpty()) {
943+
if (graph.getGuardsStage().allowsFloatingGuards() && graph.hasNode(GuardNode.TYPE)) {
944944
// Now process guards.
945945
if (GuardPriorities.getValue(graph.getOptions()) && withGuardOrder) {
946946
EnumMap<GuardPriority, List<GuardNode>> guardsByPriority = new EnumMap<>(GuardPriority.class);
@@ -955,8 +955,6 @@ private void scheduleEarliestIterative(BlockMap<List<Node>> blockToNodes, NodeMa
955955
} else {
956956
processNodes(visited, entries, stack, startBlock, graph.getNodes(GuardNode.TYPE));
957957
}
958-
} else {
959-
assert graph.getNodes(GuardNode.TYPE).isEmpty();
960958
}
961959

962960
// Now process inputs of fixed nodes.

0 commit comments

Comments
 (0)