Skip to content

Commit

Permalink
8345158: IGV: local scheduling should not place successors before pre…
Browse files Browse the repository at this point in the history
…decessors

Reviewed-by: rcastanedalo, chagedorn
  • Loading branch information
danielogh authored and robcasloz committed Dec 3, 2024
1 parent 8cad043 commit 65b5a2e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ private void scheduleLocal() {
};

private List<InputNode> scheduleBlock(Collection<Node> nodes) {
List<InputNode> schedule = new ArrayList<>();
LinkedHashSet<InputNode> schedule = new LinkedHashSet<InputNode>();

// Initialize ready priority queue with nodes without predecessors.
Queue<Node> ready = new PriorityQueue<>(schedulePriority);
Expand All @@ -407,7 +407,7 @@ private List<InputNode> scheduleBlock(Collection<Node> nodes) {
}
boolean allPredsScheduled = true;
for (Node p : s.preds) {
if (!visited.contains(p)) {
if (!schedule.contains(p.inputNode)) {
allPredsScheduled = false;
break;
}
Expand All @@ -419,7 +419,7 @@ private List<InputNode> scheduleBlock(Collection<Node> nodes) {
}
}
assert(schedule.size() == nodes.size());
return schedule;
return new ArrayList<InputNode>(schedule);
}

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

0 comments on commit 65b5a2e

Please sign in to comment.