changeset 2850:7474789a8120

Merge
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Tue, 07 Jun 2011 11:19:01 +0200
parents 463657856f86 (diff) e55543ff91fd (current diff)
children 14708c03abba
files graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java graal/GraalCompiler/src/com/sun/c1x/ir/Phi.java graal/GraalGraph/src/com/oracle/graal/graph/EndNode.java
diffstat 14 files changed, 89 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/oracle/max/graal/schedule/Schedule.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/oracle/max/graal/schedule/Schedule.java	Tue Jun 07 11:19:01 2011 +0200
@@ -82,7 +82,7 @@
     }
 
     private static boolean isCFG(Node n) {
-        return n != null && ((n instanceof Instruction) || n == n.graph().start());
+        return n != null && ((n instanceof FixedNode) || n == n.graph().start());
     }
 
     public static boolean isBlockEnd(Node n) {
--- a/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java	Tue Jun 07 11:19:01 2011 +0200
@@ -25,13 +25,12 @@
 
 import java.util.*;
 
-import com.oracle.graal.graph.*;
 import com.oracle.max.asm.*;
 import com.sun.c1x.alloc.*;
 import com.sun.c1x.asm.*;
 import com.sun.c1x.debug.*;
 import com.sun.c1x.gen.*;
-import com.sun.c1x.gen.LIRGenerator.*;
+import com.sun.c1x.gen.LIRGenerator.DeoptimizationStub;
 import com.sun.c1x.graph.*;
 import com.sun.c1x.lir.*;
 import com.sun.c1x.observer.*;
--- a/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java	Tue Jun 07 11:19:01 2011 +0200
@@ -42,7 +42,6 @@
 import com.sun.c1x.lir.*;
 import com.sun.c1x.util.*;
 import com.sun.c1x.value.*;
-import com.sun.cri.bytecode.*;
 import com.sun.cri.bytecode.Bytecodes.MemoryBarriers;
 import com.sun.cri.ci.*;
 import com.sun.cri.ri.*;
@@ -1397,7 +1396,7 @@
     protected void preGCWriteBarrier(CiValue addrOpr, boolean patch, LIRDebugInfo info) {
     }
 
-    protected void setNoResult(Instruction x) {
+    protected void setNoResult(Value x) {
         x.clearOperand();
     }
 
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/ArrayLength.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/ArrayLength.java	Tue Jun 07 11:19:01 2011 +0200
@@ -31,7 +31,7 @@
 /**
  * The {@code ArrayLength} instruction gets the length of an array.
  */
-public final class ArrayLength extends Value {
+public final class ArrayLength extends FloatingNode {
 
     private static final int INPUT_COUNT = 1;
     private static final int INPUT_ARRAY = 0;
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Constant.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Constant.java	Tue Jun 07 11:19:01 2011 +0200
@@ -33,7 +33,7 @@
  * The {@code Constant} instruction represents a constant such as an integer value,
  * long, float, object reference, address, etc.
  */
-public final class Constant extends Value {
+public final class Constant extends FloatingNode {
 
     private static final int INPUT_COUNT = 0;
     private static final int SUCCESSOR_COUNT = 0;
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Convert.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Convert.java	Tue Jun 07 11:19:01 2011 +0200
@@ -31,7 +31,7 @@
 /**
  * The {@code Convert} class represents a conversion between primitive types.
  */
-public final class Convert extends Value {
+public final class Convert extends FloatingNode {
 
     private static final int INPUT_COUNT = 1;
     private static final int INPUT_VALUE = 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/FixedNode.java	Tue Jun 07 11:19:01 2011 +0200
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.c1x.ir;
+
+import com.oracle.graal.graph.*;
+import com.sun.cri.ci.*;
+
+
+public abstract class FixedNode extends Value {
+
+    public FixedNode(CiKind kind, int inputCount, int successorCount, Graph graph) {
+        super(kind, inputCount, successorCount, graph);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/FloatingNode.java	Tue Jun 07 11:19:01 2011 +0200
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.c1x.ir;
+
+import com.oracle.graal.graph.*;
+import com.sun.cri.ci.*;
+
+
+public abstract class FloatingNode extends Value {
+
+    /**
+     * @param kind
+     * @param inputCount
+     * @param successorCount
+     * @param graph
+     */
+    public FloatingNode(CiKind kind, int inputCount, int successorCount, Graph graph) {
+        super(kind, inputCount, successorCount, graph);
+    }
+
+}
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java	Tue Jun 07 11:19:01 2011 +0200
@@ -41,7 +41,7 @@
  * Instruction nodes are chained together in a basic block through the embedded
  * {@link Instruction#next} field. An Instruction may also have a list of {@link ExceptionHandler}s.
  */
-public abstract class Instruction extends Value {
+public abstract class Instruction extends FixedNode {
 
     private static final int INPUT_COUNT = 0;
 
@@ -111,8 +111,7 @@
     }
 
     /**
-     * Gets the state after the instruction, if it is recorded. Typically only
-     * instances of {@link BlockEnd} have a non-null state after.
+     * Gets the state after the instruction, if it is recorded.
      * @return the state after the instruction
      */
     public FrameState stateAfter() {
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Local.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Local.java	Tue Jun 07 11:19:01 2011 +0200
@@ -31,7 +31,7 @@
  * The {@code Local} instruction is a placeholder for an incoming argument
  * to a function call.
  */
-public final class Local extends Value {
+public final class Local extends FloatingNode {
 
     private static final int INPUT_COUNT = 1;
 
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/NegateOp.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/NegateOp.java	Tue Jun 07 11:19:01 2011 +0200
@@ -31,7 +31,7 @@
 /**
  * The {@code NegateOp} instruction negates its operand.
  */
-public final class NegateOp extends Value {
+public final class NegateOp extends FloatingNode {
 
     private static final int INPUT_COUNT = 2;
     private static final int INPUT_X = 0;
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/NewInstance.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/NewInstance.java	Tue Jun 07 11:19:01 2011 +0200
@@ -30,7 +30,7 @@
 /**
  * The {@code NewInstance} instruction represents the allocation of an instance class object.
  */
-public final class NewInstance extends Value {
+public final class NewInstance extends FloatingNode {
 
     private static final int INPUT_COUNT = 0;
     private static final int SUCCESSOR_COUNT = 0;
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Op2.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Op2.java	Tue Jun 07 11:19:01 2011 +0200
@@ -30,7 +30,7 @@
 /**
  * The {@code Op2} class is the base of arithmetic and logic operations with two inputs.
  */
-public abstract class Op2 extends Value {
+public abstract class Op2 extends FloatingNode {
 
     private static final int INPUT_COUNT = 2;
     private static final int INPUT_X = 0;
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Phi.java	Wed Jun 01 16:56:54 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Phi.java	Tue Jun 07 11:19:01 2011 +0200
@@ -30,7 +30,7 @@
  * The {@code Phi} instruction represents the merging of dataflow
  * in the instruction graph. It refers to a join block and a variable.
  */
-public final class Phi extends Value {
+public final class Phi extends FixedNode {
 
     private static final int DEFAULT_MAX_VALUES = 2;