Skip to content

Commit 65b5a2e

Browse files
danieloghrobcasloz
authored andcommitted
8345158: IGV: local scheduling should not place successors before predecessors
Reviewed-by: rcastanedalo, chagedorn
1 parent 8cad043 commit 65b5a2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/IdealGraphVisualizer/ServerCompiler/src/main/java/com/sun/hotspot/igv/servercompiler/ServerCompilerScheduler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ private void scheduleLocal() {
382382
};
383383

384384
private List<InputNode> scheduleBlock(Collection<Node> nodes) {
385-
List<InputNode> schedule = new ArrayList<>();
385+
LinkedHashSet<InputNode> schedule = new LinkedHashSet<InputNode>();
386386

387387
// Initialize ready priority queue with nodes without predecessors.
388388
Queue<Node> ready = new PriorityQueue<>(schedulePriority);
@@ -407,7 +407,7 @@ private List<InputNode> scheduleBlock(Collection<Node> nodes) {
407407
}
408408
boolean allPredsScheduled = true;
409409
for (Node p : s.preds) {
410-
if (!visited.contains(p)) {
410+
if (!schedule.contains(p.inputNode)) {
411411
allPredsScheduled = false;
412412
break;
413413
}
@@ -419,7 +419,7 @@ private List<InputNode> scheduleBlock(Collection<Node> nodes) {
419419
}
420420
}
421421
assert(schedule.size() == nodes.size());
422-
return schedule;
422+
return new ArrayList<InputNode>(schedule);
423423
}
424424

425425
// Return latest block that dominates all successors of n, or null if any

0 commit comments

Comments
 (0)