changeset 8649:39fc99302250

PiNode: use existing dependencies array for anchor also switch order of parameters in constructor in order to match the constructor of UnsafeCast
author Bernhard Urban <bernhard.urban@jku.at>
date Thu, 04 Apr 2013 10:50:39 +0200
parents 45f929dff6c3
children 251b1c84e668
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java
diffstat 3 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.java	Thu Apr 04 13:25:15 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/PiNode.java	Thu Apr 04 10:50:39 2013 +0200
@@ -33,20 +33,20 @@
 public class PiNode extends FloatingNode implements LIRLowerable, Virtualizable {
 
     @Input private ValueNode object;
-    @Input(notDataflow = true) private final FixedNode anchor;
 
     public ValueNode object() {
         return object;
     }
 
-    public FixedNode anchor() {
-        return anchor;
+    public PiNode(ValueNode object, Stamp stamp) {
+        super(stamp);
+        this.object = object;
     }
 
-    public PiNode(ValueNode object, FixedNode anchor, Stamp stamp) {
-        super(stamp);
+    public PiNode(ValueNode object, Stamp stamp, ValueNode anchor) {
+        super(stamp, anchor);
+        assert anchor instanceof FixedNode;
         this.object = object;
-        this.anchor = anchor;
     }
 
     @Override
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java	Thu Apr 04 13:25:15 2013 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java	Thu Apr 04 10:50:39 2013 +0200
@@ -482,9 +482,9 @@
                     PiNode piNode;
                     if (isNull) {
                         ConstantNode nullObject = ConstantNode.forObject(null, metaAccessProvider, graph);
-                        piNode = graph.unique(new PiNode(nullObject, anchor, StampFactory.forConstant(nullObject.value, metaAccessProvider)));
+                        piNode = graph.unique(new PiNode(nullObject, StampFactory.forConstant(nullObject.value, metaAccessProvider), anchor));
                     } else {
-                        piNode = graph.unique(new PiNode(object, anchor, StampFactory.declared(type, nonNull)));
+                        piNode = graph.unique(new PiNode(object, StampFactory.declared(type, nonNull), anchor));
                     }
                     checkCast.replaceAtUsages(piNode);
                     graph.replaceFixedWithFixed(checkCast, anchor);
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java	Thu Apr 04 13:25:15 2013 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java	Thu Apr 04 10:50:39 2013 +0200
@@ -931,7 +931,7 @@
 
     private static PiNode createAnchoredReceiver(StructuredGraph graph, FixedNode anchor, ResolvedJavaType commonType, ValueNode receiver, boolean exact) {
         // to avoid that floating reads on receiver fields float above the type check
-        return graph.unique(new PiNode(receiver, anchor, exact ? StampFactory.exactNonNull(commonType) : StampFactory.declaredNonNull(commonType)));
+        return graph.unique(new PiNode(receiver, exact ? StampFactory.exactNonNull(commonType) : StampFactory.declaredNonNull(commonType), anchor));
     }
 
     private static boolean checkInvokeConditions(Invoke invoke) {