diff --git a/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/java/com/sun/hotspot/igv/servercompiler/ServerCompilerScheduler.java b/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/java/com/sun/hotspot/igv/servercompiler/ServerCompilerScheduler.java index 378e3bb6d40ec..95a0b71c16df3 100644 --- a/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/java/com/sun/hotspot/igv/servercompiler/ServerCompilerScheduler.java +++ b/src/utils/IdealGraphVisualizer/ServerCompiler/src/main/java/com/sun/hotspot/igv/servercompiler/ServerCompilerScheduler.java @@ -382,7 +382,7 @@ private void scheduleLocal() { }; private List scheduleBlock(Collection nodes) { - List schedule = new ArrayList<>(); + LinkedHashSet schedule = new LinkedHashSet(); // Initialize ready priority queue with nodes without predecessors. Queue ready = new PriorityQueue<>(schedulePriority); @@ -407,7 +407,7 @@ private List scheduleBlock(Collection nodes) { } boolean allPredsScheduled = true; for (Node p : s.preds) { - if (!visited.contains(p)) { + if (!schedule.contains(p.inputNode)) { allPredsScheduled = false; break; } @@ -419,7 +419,7 @@ private List scheduleBlock(Collection nodes) { } } assert(schedule.size() == nodes.size()); - return schedule; + return new ArrayList(schedule); } // Return latest block that dominates all successors of n, or null if any