Skip to content

Commit

Permalink
8297294: compiler/c2/irTests/TestMulNodeIdealization.java failed comp…
Browse files Browse the repository at this point in the history
…ilation

Reviewed-by: mcimadamore
  • Loading branch information
Vicente Romero committed Dec 1, 2022
1 parent 337ca10 commit 82031d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -1264,7 +1263,7 @@ boolean apply(Warner warn) {
}

/** an incorporation cache keeps track of all executed incorporation-related operations */
Map<IncorporationBinaryOp, Boolean> incorporationCache = new HashMap<>();
Map<IncorporationBinaryOp, Boolean> incorporationCache = new LinkedHashMap<>();

protected static class BoundFilter implements Predicate<Type> {

Expand Down Expand Up @@ -1426,7 +1425,7 @@ Pair<List<Node>, Integer> computeTreeToLeafs(Node n) {
}

/** cache used to avoid redundant computation of tree costs */
final Map<Node, Pair<List<Node>, Integer>> treeCache = new HashMap<>();
final Map<Node, Pair<List<Node>, Integer>> treeCache = new LinkedHashMap<>();

/** constant value used to mark non-existent paths */
final Pair<List<Node>, Integer> noPath = new Pair<>(null, Integer.MAX_VALUE);
Expand Down Expand Up @@ -1754,7 +1753,7 @@ protected boolean removeDependency(Node n) {
* through all its dependencies.
*/
protected Set<Node> closure() {
Set<Node> closure = new HashSet<>();
Set<Node> closure = new LinkedHashSet<>();
closureInternal(closure);
return closure;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
Expand Down Expand Up @@ -551,7 +550,7 @@ public String toString() {
* This is why the tree is used as the key of the map below. This map
* stores a Type per AST.
*/
Map<JCTree, Type> captureTypeCache = new HashMap<>();
Map<JCTree, Type> captureTypeCache = new LinkedHashMap<>();

Type cachedCapture(JCTree tree, Type t, boolean readOnly) {
Type captured = captureTypeCache.get(tree);
Expand Down

1 comment on commit 82031d3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.