# HG changeset patch # User Doug Simon # Date 1416127444 -3600 # Node ID 1518c3296cc886525f81cc39a183ac42dc996440 # Parent 322d928a373e31b463917646b05155a446136cd7 use deterministic iteration order Set and Map data structures when in the scope of a replay compilation context diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/remote/Context.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/remote/Context.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/remote/Context.java Sun Nov 16 09:44:04 2014 +0100 @@ -59,6 +59,30 @@ this.mode = mode; } + public static HashMap newMap() { + return Context.getCurrent() == null ? new HashMap<>() : new LinkedHashMap<>(); + } + + public static HashMap newMap(Map m) { + return Context.getCurrent() == null ? new HashMap<>(m) : new LinkedHashMap<>(m); + } + + public static HashMap newMap(int initialCapacity) { + return Context.getCurrent() == null ? new HashMap<>(initialCapacity) : new LinkedHashMap<>(initialCapacity); + } + + public static Map newIdentityMap() { + return Context.getCurrent() == null ? new IdentityHashMap<>() : new LinkedIdentityHashMap<>(); + } + + public static Map newIdentityMap(int expectedMaxSize) { + return Context.getCurrent() == null ? new IdentityHashMap<>(expectedMaxSize) : new LinkedIdentityHashMap<>(); + } + + public static Map newIdentityMap(Map m) { + return Context.getCurrent() == null ? new IdentityHashMap<>(m) : new LinkedIdentityHashMap<>(m); + } + /** * Gets a descriptor for the fields in a class that can be used for serialization. */ diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/DebugInfoBuilder.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,8 +22,6 @@ */ package com.oracle.graal.compiler.gen; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import java.util.Map.Entry; @@ -49,8 +47,8 @@ this.nodeOperands = nodeOperands; } - protected final Map virtualObjects = new HashMap<>(); - protected final Map objectStates = newNodeIdentityMap(); + protected final Map virtualObjects = Node.newMap(); + protected final Map objectStates = Node.newIdentityMap(); public LIRFrameState build(FrameState topState, LabelRef exceptionEdge) { assert virtualObjects.size() == 0; @@ -79,7 +77,7 @@ boolean changed; do { changed = false; - Map virtualObjectsCopy = newIdentityMap(virtualObjects); + Map virtualObjectsCopy = Node.newIdentityMap(virtualObjects); for (Entry entry : virtualObjectsCopy.entrySet()) { if (entry.getValue().getValues() == null) { VirtualObjectNode vobj = entry.getKey(); diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Sun Nov 16 09:44:04 2014 +0100 @@ -51,8 +51,18 @@ * *

Replay Compilation

* - * To enable deterministic replay compilation, node hash set creation within a compilation scope - * must {@link #newNodeHashSet()} or {@link #newNodeHashSet(Collection)}. + * To enable deterministic replay compilation, node sets and node maps should be instantiated with + * the following methods: + *
    + *
  • {@link #newSet()}
  • + *
  • {@link #newSet(Collection)}
  • + *
  • {@link #newMap()}
  • + *
  • {@link #newMap(int)}
  • + *
  • {@link #newMap(Map)}
  • + *
  • {@link #newIdentityMap()}
  • + *
  • {@link #newIdentityMap(int)}
  • + *
  • {@link #newIdentityMap(Map)}
  • + *
* *

Assertions and Verification

* @@ -199,21 +209,58 @@ } /** - * Creates a {@link Node} hash set. The return set will be a {@link LinkedHashSet} if the - * current thread has an active compilation replay scope. This is requires to make replay - * compilations deterministic. + * Creates a {@link Node} set. If the current thread has a non-null + * {@linkplain Context#getCurrent() compilation replay scope}, the returned set will have a + * deterministic iteration order determined by the order in which elements are inserted in the + * map. */ - public static HashSet newNodeHashSet() { + public static Set newSet() { return Context.getCurrent() == null ? new HashSet<>() : new LinkedHashSet<>(); } /** - * @see #newNodeHashSet() + * @see #newSet() */ - public static HashSet newNodeHashSet(Collection c) { + public static Set newSet(Collection c) { return Context.getCurrent() == null ? new HashSet<>(c) : new LinkedHashSet<>(c); } + public static Map newMap() { + // Node.equals() and Node.hashCode() are final and are implemented + // purely in terms of identity so HashMap and IdentityHashMap with + // Node's as keys will behave the same. We choose to use the latter + // due to its lighter memory footprint. + return newIdentityMap(); + } + + public static Map newMap(Map m) { + // Node.equals() and Node.hashCode() are final and are implemented + // purely in terms of identity so HashMap and IdentityHashMap with + // Node's as keys will behave the same. We choose to use the latter + // due to its lighter memory footprint. + return newIdentityMap(m); + } + + public static Map newMap(int expectedMaxSize) { + // Node.equals() and Node.hashCode() are final and are implemented + // purely in terms of identity so HashMap and IdentityHashMap with + // Node's as keys will behave the same. We choose to use the latter + // due to its lighter memory footprint. + return newIdentityMap(expectedMaxSize); + } + + public static Map newIdentityMap() { + return Context.newIdentityMap(); + } + + public static Map newIdentityMap(Map m) { + return Context.newIdentityMap(m); + } + + public static Map newIdentityMap(int expectedMaxSize) { + return Context.newIdentityMap(expectedMaxSize); + } + /** * Gets the graph context of this node. */ diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Sun Nov 16 09:44:04 2014 +0100 @@ -26,7 +26,6 @@ import static com.oracle.graal.graph.Edges.*; import static com.oracle.graal.graph.InputEdges.*; import static com.oracle.graal.graph.Node.*; -import static com.oracle.graal.graph.util.CollectionsAccess.*; import java.lang.annotation.*; import java.lang.reflect.*; diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/InductionVariables.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/InductionVariables.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/InductionVariables.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,7 +22,7 @@ */ package com.oracle.graal.loop; -import static com.oracle.graal.graph.util.CollectionsAccess.*; +import static com.oracle.graal.graph.Node.*; import java.util.*; @@ -38,7 +38,7 @@ public InductionVariables(LoopEx loop) { this.loop = loop; - ivs = newNodeIdentityMap(); + ivs = newIdentityMap(); findDerived(findBasic()); } diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragment.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragment.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragment.java Sun Nov 16 09:44:04 2014 +0100 @@ -332,7 +332,7 @@ * VirtualState nodes contained in the old exit's state may be shared by other * dominated VirtualStates. Those dominated virtual states need to see the * proxy->phi update that are applied below. - * + * * We now update the original fragment's nodes accordingly: */ originalExitState.applyToVirtual(node -> original.nodes.clearAndGrow(node)); diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragmentInside.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragmentInside.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopFragmentInside.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,16 +22,14 @@ */ package com.oracle.graal.loop; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.compiler.common.*; -import com.oracle.graal.graph.Graph.DuplicationReplacement; import com.oracle.graal.graph.*; +import com.oracle.graal.graph.Graph.*; import com.oracle.graal.graph.iterators.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.VirtualState.NodeClosure; +import com.oracle.graal.nodes.VirtualState.*; import com.oracle.graal.nodes.util.*; public class LoopFragmentInside extends LoopFragment { @@ -145,7 +143,7 @@ final StructuredGraph graph = graph(); return new DuplicationReplacement() { - private HashMap seenNode = new HashMap<>(); + private Map seenNode = Node.newMap(); @Override public Node replacement(Node original) { @@ -306,7 +304,7 @@ reverseEnds.put(duplicate, le); } } - mergedInitializers = newNodeIdentityMap(); + mergedInitializers = Node.newIdentityMap(); BeginNode newExit; StructuredGraph graph = graph(); if (endsToMerge.size() == 1) { diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopsData.java --- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopsData.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopsData.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,20 +22,20 @@ */ package com.oracle.graal.loop; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.compiler.common.cfg.*; +import com.oracle.graal.compiler.common.remote.*; import com.oracle.graal.debug.*; import com.oracle.graal.debug.Debug.Scope; +import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.cfg.*; public class LoopsData { - private Map, LoopEx> loopToEx = newIdentityMap(); - private Map loopBeginToEx = newNodeIdentityMap(); + private Map, LoopEx> loopToEx = Context.newIdentityMap(); + private Map loopBeginToEx = Node.newIdentityMap(); private ControlFlowGraph cfg; public LoopsData(final StructuredGraph graph) { diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java Sun Nov 16 09:44:04 2014 +0100 @@ -219,7 +219,7 @@ */ public void removeDeadPhis() { if (phis().isNotEmpty()) { - Set alive = new HashSet<>(); + Set alive = Node.newSet(); for (PhiNode phi : phis()) { NodePredicate isAlive = u -> !isPhiAtMerge(u) || alive.contains(u); if (phi.usages().filter(isAlive).isNotEmpty()) { diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Sun Nov 16 09:44:04 2014 +0100 @@ -186,7 +186,7 @@ copy.setGuardsStage(getGuardsStage()); copy.isAfterFloatingReadPhase = isAfterFloatingReadPhase; copy.hasValueProxies = hasValueProxies; - HashMap replacements = new HashMap<>(); + Map replacements = Node.newMap(); replacements.put(start, copy.start); copy.addDuplicates(getNodes(), this, this.getNodeCount(), replacements); return copy; diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,8 +22,6 @@ */ package com.oracle.graal.phases.common; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.api.meta.*; @@ -104,39 +102,39 @@ public static class State extends MergeableState implements Cloneable { private Map knownTypes; - private HashSet knownNonNull; - private HashSet knownNull; + private Set knownNonNull; + private Set knownNull; private Map trueConditions; private Map falseConditions; private Map valueConstraints; public State() { - this.knownTypes = newNodeIdentityMap(); - this.knownNonNull = new HashSet<>(); - this.knownNull = new HashSet<>(); - this.trueConditions = newNodeIdentityMap(); - this.falseConditions = newNodeIdentityMap(); - this.valueConstraints = newNodeIdentityMap(); + this.knownTypes = Node.newIdentityMap(); + this.knownNonNull = Node.newSet(); + this.knownNull = Node.newSet(); + this.trueConditions = Node.newIdentityMap(); + this.falseConditions = Node.newIdentityMap(); + this.valueConstraints = Node.newIdentityMap(); } public State(State other) { - this.knownTypes = newNodeIdentityMap(other.knownTypes); - this.knownNonNull = new HashSet<>(other.knownNonNull); - this.knownNull = new HashSet<>(other.knownNull); - this.trueConditions = newNodeIdentityMap(other.trueConditions); - this.falseConditions = newNodeIdentityMap(other.falseConditions); - this.valueConstraints = newNodeIdentityMap(other.valueConstraints); + this.knownTypes = Node.newIdentityMap(other.knownTypes); + this.knownNonNull = Node.newSet(other.knownNonNull); + this.knownNull = Node.newSet(other.knownNull); + this.trueConditions = Node.newIdentityMap(other.trueConditions); + this.falseConditions = Node.newIdentityMap(other.falseConditions); + this.valueConstraints = Node.newIdentityMap(other.valueConstraints); } @Override public boolean merge(MergeNode merge, List withStates) { - Map newKnownTypes = newNodeIdentityMap(); - Map newTrueConditions = newNodeIdentityMap(); - Map newFalseConditions = newNodeIdentityMap(); - Map newValueConstraints = newNodeIdentityMap(); + Map newKnownTypes = Node.newIdentityMap(); + Map newTrueConditions = Node.newIdentityMap(); + Map newFalseConditions = Node.newIdentityMap(); + Map newValueConstraints = Node.newIdentityMap(); - HashSet newKnownNull = new HashSet<>(knownNull); - HashSet newKnownNonNull = new HashSet<>(knownNonNull); + Set newKnownNull = Node.newSet(knownNull); + Set newKnownNonNull = Node.newSet(knownNonNull); for (State state : withStates) { newKnownNull.retainAll(state.knownNull); newKnownNonNull.retainAll(state.knownNonNull); @@ -678,7 +676,7 @@ } // Collect the guards which have produced conditional stamps. - HashSet provers = new HashSet<>(); + Set provers = Node.newSet(); for (Map.Entry e : state.valueConstraints.entrySet()) { provers.add(e.getValue().getGuard()); } diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/FloatingReadPhase.java Sun Nov 16 09:44:04 2014 +0100 @@ -24,11 +24,10 @@ import static com.oracle.graal.api.meta.LocationIdentity.*; import static com.oracle.graal.graph.Graph.NodeEvent.*; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.compiler.common.remote.*; import com.oracle.graal.graph.Graph.NodeEventScope; import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; @@ -131,7 +130,7 @@ @Override protected void run(StructuredGraph graph) { - Map> modifiedInLoops = newNodeIdentityMap(); + Map> modifiedInLoops = Node.newIdentityMap(); ReentrantNodeIterator.apply(new CollectMemoryCheckpointsClosure(modifiedInLoops), graph.start(), new HashSet()); HashSetNodeEventListener listener = new HashSetNodeEventListener(EnumSet.of(NODE_ADDED, ZERO_USAGES)); try (NodeEventScope nes = graph.trackNodeEvents(listener)) { @@ -163,7 +162,7 @@ if (updateExistingPhis) { for (MemoryPhiNode phi : merge.phis().filter(MemoryPhiNode.class)) { if (existingPhis == null) { - existingPhis = newIdentityMap(); + existingPhis = Context.newIdentityMap(); } phi.values().clear(); existingPhis.put(phi.getLocationIdentity(), phi); diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java Sun Nov 16 09:44:04 2014 +0100 @@ -23,7 +23,6 @@ package com.oracle.graal.phases.common; import static com.oracle.graal.compiler.common.GraalOptions.*; -import static com.oracle.graal.graph.util.CollectionsAccess.*; import java.util.*; import java.util.Map.Entry; @@ -62,7 +61,7 @@ private static class UseImplicitNullChecks extends ScheduledNodeIterator { - private final Map nullGuarded = newIdentityMap(); + private final Map nullGuarded = Node.newIdentityMap(); private final int implicitNullCheckLimit; UseImplicitNullChecks(int implicitNullCheckLimit) { diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java Sun Nov 16 09:44:04 2014 +0100 @@ -219,7 +219,7 @@ private final MergeNode merge; private final StructuredGraph graph; - private final HashMap bottomPhis = new HashMap<>(); + private final Map bottomPhis = Node.newMap(); private final List replacements; private final CanonicalizerPhase canonicalizer; @@ -275,7 +275,7 @@ AbstractEndNode endAfter = createNewMerge(fixed, stateAfter); MergeNode mergeAfter = endAfter.merge(); fixedNodes.add(endAfter); - final HashSet duplicatedNodes = buildDuplicatedNodeSet(fixedNodes, stateAfter); + final Set duplicatedNodes = buildDuplicatedNodeSet(fixedNodes, stateAfter); mergeAfter.clearEnds(); expandDuplicated(duplicatedNodes, mergeAfter); @@ -288,7 +288,7 @@ if (replacements == null || replacements.get(endIndex) == null) { duplicates = graph.addDuplicates(duplicatedNodes, graph, duplicatedNodes.size(), (DuplicationReplacement) null); } else { - HashMap replace = new HashMap<>(); + Map replace = Node.newMap(); replace.put(replacements.get(endIndex).object(), replacements.get(endIndex)); duplicates = graph.addDuplicates(duplicatedNodes, graph, duplicatedNodes.size(), replace); } @@ -359,7 +359,7 @@ * from within the duplicated set of nodes. * @return The set of nodes that need to be duplicated. */ - private HashSet buildDuplicatedNodeSet(final ArrayList fixedNodes, FrameState stateAfter) { + private Set buildDuplicatedNodeSet(final ArrayList fixedNodes, FrameState stateAfter) { final NodeBitMap aboveBound = graph.createNodeBitMap(); final NodeBitMap belowBound = graph.createNodeBitMap(); @@ -434,7 +434,7 @@ // build the intersection belowBound.intersect(aboveBound); - HashSet result = Node.newNodeHashSet(); + Set result = Node.newSet(); for (Node node : belowBound) { result.add(node); } @@ -480,7 +480,7 @@ * for newly created phis and to as a target for dependencies that pointed into * the duplicated set of nodes. */ - private void expandDuplicated(HashSet duplicatedNodes, MergeNode newBottomMerge) { + private void expandDuplicated(Set duplicatedNodes, MergeNode newBottomMerge) { Deque worklist = new ArrayDeque<>(duplicatedNodes); while (!worklist.isEmpty()) { @@ -490,8 +490,8 @@ } } - private void processUsages(Node duplicated, HashSet duplicatedNodes, MergeNode newBottomMerge, Deque worklist) { - HashSet unique = Node.newNodeHashSet(); + private void processUsages(Node duplicated, Set duplicatedNodes, MergeNode newBottomMerge, Deque worklist) { + Set unique = Node.newSet(); duplicated.usages().snapshotTo(unique); Node newOutsideClone = null; for (Node usage : unique) { @@ -542,7 +542,7 @@ } } - private void processInputs(Node duplicated, HashSet duplicatedNodes, Deque worklist) { + private void processInputs(Node duplicated, Set duplicatedNodes, Deque worklist) { // check if this node has an input that lies outside and cannot be shared NodePosIterator iter = duplicated.inputs().iterator(); while (iter.hasNext()) { diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ValueAnchorCleanupPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ValueAnchorCleanupPhase.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ValueAnchorCleanupPhase.java Sun Nov 16 09:44:04 2014 +0100 @@ -39,14 +39,14 @@ private static class State extends MergeableState implements Cloneable { - private final HashSet anchoredValues; + private final Set anchoredValues; public State() { - anchoredValues = Node.newNodeHashSet(); + anchoredValues = Node.newSet(); } public State(State other) { - anchoredValues = Node.newNodeHashSet(other.anchoredValues); + anchoredValues = Node.newSet(other.anchoredValues); } @Override diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/EquationalReasoner.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,8 +22,6 @@ */ package com.oracle.graal.phases.common.cfs; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.api.meta.*; @@ -81,7 +79,7 @@ * {@link com.oracle.graal.graph.NodeBitMap NodeBitMap} but in this set instead (those nodes are * added after the {@link com.oracle.graal.graph.NodeBitMap} was obtained). */ - final Set added = newNodeIdentitySet(); + final Set added = Node.newSet(); /** * The reduction of a FloatingNode performed by {@link EquationalReasoner EquationalReasoner} @@ -91,7 +89,7 @@ * The substitutions tracked in this field become invalid as described in * {@link #updateState(com.oracle.graal.phases.common.cfs.State) updateState(State)} */ - private final Map substs = newNodeIdentityMap(); + private final Map substs = Node.newIdentityMap(); public EquationalReasoner(StructuredGraph graph, CanonicalizerTool tool, LogicConstantNode trueConstant, LogicConstantNode falseConstant, ConstantNode nullConstant) { this.graph = graph; diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/cfs/State.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,14 +22,13 @@ */ package com.oracle.graal.phases.common.cfs; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.lang.reflect.*; import java.util.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.common.type.*; import com.oracle.graal.debug.*; +import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.extended.*; @@ -116,20 +115,20 @@ Map falseFacts; public State() { - this.typeRefinements = newNodeIdentityMap(); - this.trueFacts = newNodeIdentityMap(); - this.falseFacts = newNodeIdentityMap(); + this.typeRefinements = Node.newIdentityMap(); + this.trueFacts = Node.newIdentityMap(); + this.falseFacts = Node.newIdentityMap(); } public State(State other) { this.isUnreachable = other.isUnreachable; this.versionNr = other.versionNr; - this.typeRefinements = newNodeIdentityMap(); + this.typeRefinements = Node.newIdentityMap(); for (Map.Entry entry : other.typeRefinements.entrySet()) { this.typeRefinements.put(entry.getKey(), new Witness(entry.getValue())); } - this.trueFacts = newNodeIdentityMap(other.trueFacts); - this.falseFacts = newNodeIdentityMap(other.falseFacts); + this.trueFacts = Node.newIdentityMap(other.trueFacts); + this.falseFacts = Node.newIdentityMap(other.falseFacts); } public boolean repOK() { @@ -155,7 +154,7 @@ } private Map mergeKnownTypes(MergeNode merge, ArrayList withReachableStates) { - Map newKnownTypes = newNodeIdentityMap(); + Map newKnownTypes = Node.newIdentityMap(); for (Map.Entry entry : typeRefinements.entrySet()) { ValueNode node = entry.getKey(); @@ -279,7 +278,7 @@ } private Map mergeTrueFacts(ArrayList withReachableStates, GuardingNode merge) { - Map newTrueConditions = newNodeIdentityMap(); + Map newTrueConditions = Node.newIdentityMap(); for (Map.Entry entry : trueFacts.entrySet()) { LogicNode check = entry.getKey(); GuardingNode guard = entry.getValue(); @@ -302,7 +301,7 @@ } private Map mergeFalseFacts(ArrayList withReachableStates, GuardingNode merge) { - Map newFalseConditions = newNodeIdentityMap(); + Map newFalseConditions = Node.newIdentityMap(); for (Map.Entry entry : falseFacts.entrySet()) { LogicNode check = entry.getKey(); GuardingNode guard = entry.getValue(); diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/CallsiteHolderExplorable.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/CallsiteHolderExplorable.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/CallsiteHolderExplorable.java Sun Nov 16 09:44:04 2014 +0100 @@ -23,6 +23,7 @@ package com.oracle.graal.phases.common.inlining.walker; import com.oracle.graal.api.meta.ResolvedJavaMethod; +import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; import com.oracle.graal.phases.graph.FixedNodeProbabilityCache; @@ -93,7 +94,7 @@ if (freshlyInstantiatedArguments == null || freshlyInstantiatedArguments.isEmpty()) { return Collections.EMPTY_SET; } - Set result = new HashSet<>(); + Set result = Node.newSet(); for (ParameterNode p : graph.getNodes(ParameterNode.class)) { if (freshlyInstantiatedArguments.get(p.index())) { result.add(p); diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/ComputeInliningRelevance.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/ComputeInliningRelevance.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/ComputeInliningRelevance.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,8 +22,6 @@ */ package com.oracle.graal.phases.common.inlining.walker; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import java.util.function.*; @@ -71,10 +69,10 @@ rootScope = new Scope(graph.start(), null); } else { if (nodeRelevances == null) { - nodeRelevances = newNodeIdentityMap(EXPECTED_MIN_INVOKE_COUNT + graph.getNodeCount() / EXPECTED_INVOKE_RATIO); + nodeRelevances = Node.newIdentityMap(EXPECTED_MIN_INVOKE_COUNT + graph.getNodeCount() / EXPECTED_INVOKE_RATIO); } NodeWorkList workList = graph.createNodeWorkList(); - Map loops = newNodeIdentityMap(EXPECTED_LOOP_COUNT); + Map loops = Node.newIdentityMap(EXPECTED_LOOP_COUNT); loops.put(null, new Scope(graph.start(), null)); for (LoopBeginNode loopBegin : graph.getNodes(LoopBeginNode.class)) { diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/InliningData.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/InliningData.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/InliningData.java Sun Nov 16 09:44:04 2014 +0100 @@ -359,7 +359,7 @@ InlineInfo calleeInfo = calleeInvocation.callee(); try { try (Debug.Scope scope = Debug.scope("doInline", callerGraph)) { - Set canonicalizedNodes = Node.newNodeHashSet(); + Set canonicalizedNodes = Node.newSet(); calleeInfo.invoke().asNode().usages().snapshotTo(canonicalizedNodes); Collection parameterUsages = calleeInfo.inline(new Providers(context), callerAssumptions); canonicalizedNodes.addAll(parameterUsages); diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/util/HashSetNodeEventListener.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/util/HashSetNodeEventListener.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/util/HashSetNodeEventListener.java Sun Nov 16 09:44:04 2014 +0100 @@ -40,7 +40,7 @@ * Creates a {@link NodeEventListener} that collects nodes from all events. */ public HashSetNodeEventListener() { - this.nodes = Node.newNodeHashSet(); + this.nodes = Node.newSet(); this.filter = EnumSet.allOf(NodeEvent.class); } diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/FixedNodeProbabilityCache.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/FixedNodeProbabilityCache.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/FixedNodeProbabilityCache.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,8 +22,6 @@ */ package com.oracle.graal.phases.graph; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import java.util.function.*; @@ -38,7 +36,7 @@ private static final DebugMetric metricComputeNodeProbability = Debug.metric("ComputeNodeProbability"); - private final Map cache = newIdentityMap(); + private final Map cache = Node.newIdentityMap(); /** *

diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/PostOrderNodeIterator.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/PostOrderNodeIterator.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/PostOrderNodeIterator.java Sun Nov 16 09:44:04 2014 +0100 @@ -25,7 +25,6 @@ import java.util.*; import com.oracle.graal.graph.*; -import com.oracle.graal.graph.util.*; import com.oracle.graal.nodes.*; /** @@ -54,7 +53,7 @@ StructuredGraph graph = start.graph(); visitedEnds = graph.createNodeBitMap(); nodeQueue = new ArrayDeque<>(); - nodeStates = CollectionsAccess.newNodeIdentityMap(); + nodeStates = Node.newIdentityMap(); this.start = start; this.state = initialState; } diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ReentrantBlockIterator.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ReentrantBlockIterator.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ReentrantBlockIterator.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,11 +22,10 @@ */ package com.oracle.graal.phases.graph; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.compiler.common.cfg.*; +import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.cfg.*; @@ -89,7 +88,7 @@ /* * States are stored on EndNodes before merges, and on BeginNodes after ControlSplitNodes. */ - Map states = newNodeIdentityMap(); + Map states = Node.newIdentityMap(); StateT state = initialState; Block current = start; diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ReentrantNodeIterator.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ReentrantNodeIterator.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ReentrantNodeIterator.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,8 +22,6 @@ */ package com.oracle.graal.phases.graph; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.graph.*; @@ -37,8 +35,8 @@ public final Map exitStates; public LoopInfo(int endCount, int exitCount) { - endStates = newNodeIdentityMap(endCount); - exitStates = newNodeIdentityMap(exitCount); + endStates = Node.newIdentityMap(endCount); + exitStates = Node.newIdentityMap(exitCount); } } @@ -90,7 +88,7 @@ private static Map apply(NodeIteratorClosure closure, FixedNode start, StateT initialState, LoopBeginNode boundary) { assert start != null; Deque nodeQueue = new ArrayDeque<>(); - Map blockEndStates = newNodeIdentityMap(); + Map blockEndStates = Node.newIdentityMap(); StateT state = initialState; FixedNode current = start; diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/SinglePassNodeIterator.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/SinglePassNodeIterator.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/SinglePassNodeIterator.java Sun Nov 16 09:44:04 2014 +0100 @@ -25,7 +25,6 @@ import java.util.*; import com.oracle.graal.graph.*; -import com.oracle.graal.graph.util.*; import com.oracle.graal.nodes.*; /** @@ -137,7 +136,7 @@ StructuredGraph graph = start.graph(); visitedEnds = graph.createNodeBitMap(); nodeQueue = new ArrayDeque<>(); - nodeStates = CollectionsAccess.newNodeIdentityMap(); + nodeStates = Node.newIdentityMap(); this.start = start; this.state = initialState; } diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Sun Nov 16 09:44:04 2014 +0100 @@ -835,7 +835,7 @@ private boolean noDuplicatedNodesInBlock(Block b) { List list = blockToNodesMap.get(b); - HashSet hashset = new HashSet<>(list); + Set hashset = Node.newSet(list); return list.size() == hashset.size(); } diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/util/GraphOrder.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,8 +22,6 @@ */ package com.oracle.graal.phases.util; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.compiler.common.*; @@ -138,7 +136,7 @@ public static boolean assertSchedulableGraph(final StructuredGraph graph) { try { final SchedulePhase schedule = new SchedulePhase(SchedulingStrategy.LATEST_OUT_OF_LOOPS, MemoryScheduling.NONE); - final Map loopEntryStates = newNodeIdentityMap(); + final Map loopEntryStates = Node.newIdentityMap(); schedule.apply(graph, false); BlockIteratorClosure closure = new BlockIteratorClosure() { diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinter.java --- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinter.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinter.java Sun Nov 16 09:44:04 2014 +0100 @@ -84,7 +84,7 @@ @Override public void print(Graph graph, String title, SchedulePhase predefinedSchedule) { beginGraph(title); - Set noBlockNodes = Node.newNodeHashSet(); + Set noBlockNodes = Node.newSet(); SchedulePhase schedule = predefinedSchedule; if (schedule == null && tryToSchedule) { if (PrintIdealGraphSchedule.getValue()) { @@ -249,7 +249,7 @@ endSuccessors(); beginBlockNodes(); - Set nodes = Node.newNodeHashSet(); + Set nodes = Node.newSet(); if (nodeToBlock != null) { for (Node n : graph.getNodes()) { @@ -270,7 +270,7 @@ } } - Set snapshot = Node.newNodeHashSet(nodes); + Set snapshot = Node.newSet(nodes); // add all framestates and phis to their blocks for (Node node : snapshot) { if (node instanceof StateSplit && ((StateSplit) node).stateAfter() != null) { diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java Sun Nov 16 09:44:04 2014 +0100 @@ -25,7 +25,6 @@ import static com.oracle.graal.api.meta.LocationIdentity.*; import static com.oracle.graal.compiler.common.GraalOptions.*; import static com.oracle.graal.debug.Debug.*; -import static com.oracle.graal.graph.util.CollectionsAccess.*; import static com.oracle.graal.phases.common.DeadCodeEliminationPhase.Optionality.*; import static com.oracle.graal.replacements.SnippetTemplate.AbstractTemplates.*; import static java.util.FormattableFlags.*; @@ -569,7 +568,7 @@ // Copy snippet graph, replacing constant parameters with given arguments final StructuredGraph snippetCopy = new StructuredGraph(snippetGraph.name, snippetGraph.method()); - Map nodeReplacements = newNodeIdentityMap(); + Map nodeReplacements = Node.newIdentityMap(); nodeReplacements.put(snippetGraph.start(), snippetCopy.start()); MetaAccessProvider metaAccess = providers.getMetaAccess(); @@ -863,7 +862,7 @@ * @return the map that will be used to bind arguments to parameters when inlining this template */ private Map bind(StructuredGraph replaceeGraph, MetaAccessProvider metaAccess, Arguments args) { - Map replacements = newNodeIdentityMap(); + Map replacements = Node.newIdentityMap(); assert args.info.getParameterCount() == parameters.length : "number of args (" + args.info.getParameterCount() + ") != number of parameters (" + parameters.length + ")"; for (int i = 0; i < parameters.length; i++) { Object parameter = parameters[i]; diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsClosure.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsClosure.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/EffectsClosure.java Sun Nov 16 09:44:04 2014 +0100 @@ -23,12 +23,11 @@ package com.oracle.graal.virtual.phases.ea; import static com.oracle.graal.compiler.common.GraalOptions.*; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.compiler.common.*; import com.oracle.graal.compiler.common.cfg.*; +import com.oracle.graal.compiler.common.remote.*; import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; @@ -46,8 +45,8 @@ protected final NodeMap aliases; protected final BlockMap blockEffects; - private final Map, GraphEffectList> loopMergeEffects = newIdentityMap(); - private final Map loopEntryStates = newNodeIdentityMap(); + private final Map, GraphEffectList> loopMergeEffects = Context.newIdentityMap(); + private final Map loopEntryStates = Node.newIdentityMap(); protected boolean changed; diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeBlockState.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeBlockState.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeBlockState.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,10 +22,9 @@ */ package com.oracle.graal.virtual.phases.ea; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; +import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.java.*; @@ -34,7 +33,7 @@ public abstract class PartialEscapeBlockState> extends EffectsBlockState { - protected final Map objectStates = newIdentityMap(); + protected final Map objectStates = Node.newIdentityMap(); /** * Final subclass of PartialEscapeBlockState, for performance and to make everything behave diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeClosure.java Sun Nov 16 09:44:04 2014 +0100 @@ -22,12 +22,11 @@ */ package com.oracle.graal.virtual.phases.ea; -import static com.oracle.graal.graph.util.CollectionsAccess.*; - import java.util.*; import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; +import com.oracle.graal.compiler.common.remote.*; import com.oracle.graal.compiler.common.type.*; import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; @@ -222,7 +221,7 @@ @Override protected void processLoopExit(LoopExitNode exitNode, BlockT initialState, BlockT exitState, GraphEffectList effects) { - HashMap proxies = new HashMap<>(); + Map proxies = Node.newMap(); for (ProxyNode proxy : exitNode.proxies()) { ObjectState obj = getObjectState(exitState, proxy.value()); @@ -272,9 +271,9 @@ protected class MergeProcessor extends EffectsClosure.MergeProcessor { - private final HashMap materializedPhis = new HashMap<>(); - private final Map valuePhis = newIdentityMap(); - private final Map valueObjectVirtuals = newNodeIdentityMap(); + private final HashMap materializedPhis = Context.newMap(); + private final Map valuePhis = Node.newIdentityMap(); + private final Map valueObjectVirtuals = Node.newIdentityMap(); public MergeProcessor(Block mergeBlock) { super(mergeBlock); @@ -322,7 +321,7 @@ super.merge(states); // calculate the set of virtual objects that exist in all predecessors - HashSet virtualObjTemp = new HashSet<>(states.get(0).getVirtualObjects()); + Set virtualObjTemp = Node.newSet(states.get(0).getVirtualObjects()); for (int i = 1; i < states.size(); i++) { virtualObjTemp.retainAll(states.get(i).getVirtualObjects()); } diff -r 322d928a373e -r 1518c3296cc8 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/VirtualUtil.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/VirtualUtil.java Sat Nov 15 23:19:58 2014 +0100 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/VirtualUtil.java Sun Nov 16 09:44:04 2014 +0100 @@ -23,7 +23,6 @@ package com.oracle.graal.virtual.phases.ea; import static com.oracle.graal.compiler.common.GraalOptions.*; -import static com.oracle.graal.graph.util.CollectionsAccess.*; import java.util.*; @@ -43,7 +42,7 @@ // helper code that determines the paths that keep obsolete nodes alive: NodeFlood flood = graph.createNodeFlood(); - Map path = newIdentityMap(); + Map path = Node.newIdentityMap(); flood.add(graph.start()); for (Node current : flood) { if (current instanceof AbstractEndNode) {