# HG changeset patch # User Roland Schatz # Date 1383913234 -3600 # Node ID dac9c1783aed57b564ef38857f545c65fcc9056b # Parent 8898d449f95d8e5beed1adb271359554a4ae01f5 Use correct type for LocationIdentity in MemoryPhi. diff -r 8898d449f95d -r dac9c1783aed graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java Fri Nov 08 13:20:09 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PhiNode.java Fri Nov 08 13:20:34 2013 +0100 @@ -51,7 +51,7 @@ @Input(notDataflow = true) private MergeNode merge; @Input private final NodeInputList values = new NodeInputList<>(this); private final PhiType type; - private final Object identity; + private final LocationIdentity identity; /** * Create a value phi ({@link PhiType#Value}) with the specified kind. @@ -77,7 +77,7 @@ * @param type the type of the new phi * @param merge the merge that the new phi belongs to */ - public PhiNode(PhiType type, MergeNode merge, Object identity) { + public PhiNode(PhiType type, MergeNode merge, LocationIdentity identity) { super(type.stamp); assert type.stamp != null : merge + " " + type; this.type = type; @@ -93,7 +93,7 @@ return merge; } - public Object getIdentity() { + public LocationIdentity getIdentity() { assert type != PhiType.Value; return identity; } diff -r 8898d449f95d -r dac9c1783aed graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ProxyNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ProxyNode.java Fri Nov 08 13:20:09 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ProxyNode.java Fri Nov 08 13:20:34 2013 +0100 @@ -22,6 +22,7 @@ */ package com.oracle.graal.nodes; +import com.oracle.graal.api.meta.*; import com.oracle.graal.graph.*; import com.oracle.graal.graph.Node.ValueNumberable; import com.oracle.graal.graph.spi.*; @@ -41,9 +42,9 @@ @Input(notDataflow = true) private AbstractBeginNode proxyPoint; @Input private ValueNode value; private final PhiType type; - private final Object identity; + private final LocationIdentity identity; - public ProxyNode(ValueNode value, AbstractBeginNode exit, PhiType type, Object identity) { + public ProxyNode(ValueNode value, AbstractBeginNode exit, PhiType type, LocationIdentity identity) { super(type == PhiType.Value ? value.stamp() : type.stamp); this.type = type; this.identity = identity; @@ -69,7 +70,7 @@ return type; } - public Object getIdentity() { + public LocationIdentity getIdentity() { assert type != PhiType.Value; return identity; } @@ -113,7 +114,7 @@ return graph.unique(new ProxyNode(value, exit, PhiType.Value, null)); } - public static ProxyNode forMemory(ValueNode value, AbstractBeginNode exit, Object location, StructuredGraph graph) { + public static ProxyNode forMemory(ValueNode value, AbstractBeginNode exit, LocationIdentity location, StructuredGraph graph) { return graph.unique(new ProxyNode(value, exit, PhiType.Memory, location)); } diff -r 8898d449f95d -r dac9c1783aed 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 Fri Nov 08 13:20:09 2013 +0100 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Fri Nov 08 13:20:34 2013 +0100 @@ -189,7 +189,7 @@ MergeNode mergeNode = (MergeNode) block.getBeginNode(); for (PhiNode phi : mergeNode.usages().filter(PhiNode.class)) { if (phi.type() == PhiType.Memory) { - LocationIdentity identity = (LocationIdentity) phi.getIdentity(); + LocationIdentity identity = phi.getIdentity(); locationKilledBy(identity, phi, currentState); } } @@ -266,7 +266,7 @@ for (Node usage : begin.usages()) { if (usage instanceof ProxyNode && ((ProxyNode) usage).type() == PhiType.Memory) { ProxyNode proxy = (ProxyNode) usage; - LocationIdentity identity = (LocationIdentity) proxy.getIdentity(); + LocationIdentity identity = proxy.getIdentity(); locationKilledBy(identity, proxy, exitState); } }