# HG changeset patch # User Thomas Wuerthinger # Date 1312837974 -7200 # Node ID 4275ca8dde2b5e665a0a349faeeb3c49442d463a # Parent eb3e8ea2956a551e68674197332808d947cc1a3d Implement GVN code automatically based on annotations (@Data) diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ArrayLength.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ArrayLength.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ArrayLength.java Mon Aug 08 23:12:54 2011 +0200 @@ -26,16 +26,14 @@ import com.oracle.max.graal.compiler.graph.*; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.NotifyReProcess; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.*; -import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.graph.*; -import com.sun.cri.bytecode.*; import com.sun.cri.ci.*; import com.sun.cri.ri.*; /** * The {@code ArrayLength} instruction gets the length of an array. */ -public final class ArrayLength extends FloatingNode { +public final class ArrayLength extends FloatingNode implements Node.GlobalValueNumberable { private static final ArrayLengthCanonicalizerOp CANONICALIZER = new ArrayLengthCanonicalizerOp(); @Input private Value array; @@ -65,16 +63,6 @@ } @Override - public int valueNumber() { - return Util.hash1(Bytecodes.ARRAYLENGTH, array()); - } - - @Override - public boolean valueEqual(Node i) { - return i instanceof ArrayLength; - } - - @Override public void print(LogStream out) { out.print(array()).print(".length"); } diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Binary.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Binary.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Binary.java Mon Aug 08 23:12:54 2011 +0200 @@ -22,7 +22,6 @@ */ package com.oracle.max.graal.compiler.ir; -import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.graph.*; import com.sun.cri.bytecode.*; import com.sun.cri.ci.*; @@ -30,11 +29,11 @@ /** * The {@code Op2} class is the base of arithmetic and logic operations with two inputs. */ -public abstract class Binary extends FloatingNode { +public abstract class Binary extends FloatingNode implements Node.GlobalValueNumberable { - @Input private Value x; - - @Input private Value y; + @Input private Value x; + @Input private Value y; + @Data public final int opcode; public Value x() { return x; @@ -55,11 +54,6 @@ } /** - * The opcode of this instruction. - */ - public final int opcode; - - /** * Creates a new Op2 instance. * @param kind the result type of this instruction * @param opcode the bytecode opcode @@ -82,18 +76,4 @@ setX(y()); setY(t); } - - @Override - public int valueNumber() { - return Util.hash2(opcode, x(), y()); - } - - @Override - public boolean valueEqual(Node i) { - if (i instanceof Binary) { - Binary o = (Binary) i; - return opcode == o.opcode && x() == o.x() && y() == o.y(); - } - return false; - } } diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/BooleanNode.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/BooleanNode.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/BooleanNode.java Mon Aug 08 23:12:54 2011 +0200 @@ -26,7 +26,7 @@ import com.sun.cri.ci.*; -public abstract class BooleanNode extends FloatingNode { +public abstract class BooleanNode extends FloatingNode implements Node.GlobalValueNumberable { public BooleanNode(CiKind kind, Graph graph) { super(kind, graph); diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/CheckCast.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/CheckCast.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/CheckCast.java Mon Aug 08 23:12:54 2011 +0200 @@ -68,16 +68,6 @@ v.visitCheckCast(this); } -// @Override -// public int valueNumber() { -// return targetClass().isResolved() ? Util.hash1(Bytecodes.CHECKCAST, object()) : 0; -// } -// -// @Override -// public boolean valueEqual(Node i) { -// return i instanceof CheckCast; -// } - @Override public void print(LogStream out) { out.print("checkcast("). diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Compare.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Compare.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Compare.java Mon Aug 08 23:12:54 2011 +0200 @@ -39,10 +39,13 @@ * into variants that do not materialize the value (CompareIf, CompareGuard...) * */ -public final class Compare extends BooleanNode { +public final class Compare extends BooleanNode implements Node.GlobalValueNumberable { @Input private Value x; @Input private Value y; + @Data private Condition condition; + @Data private boolean unorderedIsTrue; + public Value x() { return x; } @@ -61,9 +64,6 @@ this.y = x; } - private Condition condition; - private boolean unorderedIsTrue; - /** * Constructs a new Compare instruction. * @param x the instruction producing the first input to the instruction @@ -79,15 +79,6 @@ setY(y); } - @Override - public boolean valueEqual(Node i) { - if (i instanceof Compare) { - Compare compare = (Compare) i; - return compare.condition == condition && compare.unorderedIsTrue == unorderedIsTrue; - } - return super.valueEqual(i); - } - /** * Gets the condition (comparison operation) for this instruction. * @return the condition diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Conditional.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Conditional.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Conditional.java Mon Aug 08 23:12:54 2011 +0200 @@ -87,14 +87,6 @@ } @Override - public boolean valueEqual(Node i) { - if (i instanceof Conditional) { - return super.valueEqual(i); - } - return false; - } - - @Override public void print(LogStream out) { out.print(x()). print(' '). diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Constant.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Constant.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Constant.java Mon Aug 08 23:12:54 2011 +0200 @@ -35,7 +35,7 @@ */ public final class Constant extends BooleanNode { - public final CiConstant value; + @Data public final CiConstant value; /** * Constructs a new instruction representing the specified constant. @@ -160,11 +160,6 @@ } @Override - public boolean valueEqual(Node i) { - return i instanceof Constant && ((Constant) i).value.equivalent(this.value); - } - - @Override public RiType declaredType() { RiRuntime runtime = compilation().runtime; if (kind.isPrimitive()) { diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Convert.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Convert.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Convert.java Mon Aug 08 23:12:54 2011 +0200 @@ -23,7 +23,6 @@ package com.oracle.max.graal.compiler.ir; import com.oracle.max.graal.compiler.debug.*; -import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.graph.*; import com.sun.cri.bytecode.*; import com.sun.cri.ci.*; @@ -31,9 +30,10 @@ /** * The {@code Convert} class represents a conversion between primitive types. */ -public final class Convert extends FloatingNode { +public final class Convert extends FloatingNode implements Node.GlobalValueNumberable { + @Input private Value value; - @Input private Value value; + @Data public final int opcode; public Value value() { return value; @@ -45,11 +45,6 @@ } /** - * The opcode for this conversion operation. - */ - public final int opcode; - - /** * Constructs a new Convert instance. * @param opcode the bytecode representing the operation * @param value the instruction producing the input value @@ -68,20 +63,6 @@ } @Override - public int valueNumber() { - return Util.hash1(opcode, value()); - } - - @Override - public boolean valueEqual(Node i) { - if (i instanceof Convert) { - Convert o = (Convert) i; - return opcode == o.opcode && value() == o.value(); - } - return false; - } - - @Override public void print(LogStream out) { out.print(Bytecodes.nameOf(opcode)).print('(').print(value()).print(')'); } diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/CreateVectorNode.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/CreateVectorNode.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/CreateVectorNode.java Mon Aug 08 23:12:54 2011 +0200 @@ -32,7 +32,7 @@ import com.sun.cri.ci.*; -public final class CreateVectorNode extends AbstractVectorNode { +public final class CreateVectorNode extends AbstractVectorNode implements Node.GlobalValueNumberable { @Input private Value length; public Value length() { @@ -90,11 +90,6 @@ return x; } - @Override - public boolean valueEqual(Node i) { - return (i instanceof CreateVectorNode); - } - private LoopBegin createLoop(Map map) { EndNode end = new EndNode(graph()); LoopBegin loopBegin = new LoopBegin(graph()); diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/GuardNode.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/GuardNode.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/GuardNode.java Mon Aug 08 23:12:54 2011 +0200 @@ -30,7 +30,7 @@ import com.sun.cri.ci.*; -public final class GuardNode extends FloatingNode { +public final class GuardNode extends FloatingNode implements Node.GlobalValueNumberable { @Input private FixedNode anchor; @Input private BooleanNode node; @@ -75,11 +75,6 @@ return new GuardNode(null, into); } - @Override - public boolean valueEqual(Node i) { - return i instanceof GuardNode; - } - @SuppressWarnings("unchecked") @Override public T lookup(Class clazz) { diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/InstanceOf.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/InstanceOf.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/InstanceOf.java Mon Aug 08 23:12:54 2011 +0200 @@ -25,9 +25,7 @@ import com.oracle.max.graal.compiler.debug.*; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.CanonicalizerOp; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.NotifyReProcess; -import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.graph.*; -import com.sun.cri.bytecode.*; import com.sun.cri.ci.*; import com.sun.cri.ri.*; @@ -36,8 +34,6 @@ */ public final class InstanceOf extends TypeCheck { - private boolean nullIsTrue; - /** * Constructs a new InstanceOf instruction. * @param targetClass the target class of the instanceof check @@ -53,25 +49,10 @@ } @Override - public int valueNumber() { - return Util.hash1(Bytecodes.INSTANCEOF, object()); - } - - @Override - public boolean valueEqual(Node i) { - return i instanceof InstanceOf; - } - - @Override public void print(LogStream out) { out.print("instanceof(").print(object()).print(") ").print(CiUtil.toJavaName(targetClass())); } - @Override - public Node copy(Graph into) { - return new InstanceOf(null, null, nullIsTrue, into); - } - @SuppressWarnings("unchecked") @Override public T lookup(Class clazz) { diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsNonNull.java Mon Aug 08 23:12:54 2011 +0200 @@ -25,9 +25,7 @@ import com.oracle.max.graal.compiler.debug.*; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.CanonicalizerOp; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.NotifyReProcess; -import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.graph.*; -import com.sun.cri.bytecode.*; import com.sun.cri.ci.*; import com.sun.cri.ri.*; @@ -64,16 +62,6 @@ } @Override - public int valueNumber() { - return Util.hash1(Bytecodes.IFNONNULL, object()); - } - - @Override - public boolean valueEqual(Node i) { - return i instanceof IsNonNull; - } - - @Override public RiType declaredType() { // null check does not alter the type of the object return object().declaredType(); diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsType.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsType.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IsType.java Mon Aug 08 23:12:54 2011 +0200 @@ -27,9 +27,7 @@ import com.oracle.max.graal.compiler.debug.*; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.CanonicalizerOp; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.NotifyReProcess; -import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.graph.*; -import com.sun.cri.bytecode.*; import com.sun.cri.ci.*; import com.sun.cri.ri.*; @@ -74,20 +72,6 @@ } @Override - public int valueNumber() { - return Util.hash1(Bytecodes.CHECKCAST, object()); - } - - @Override - public boolean valueEqual(Node i) { - if (i instanceof IsType) { - IsType o = (IsType) i; - return type == o.type(); - } - return false; - } - - @Override public RiType declaredType() { // type check does not alter the type of the object return object().declaredType(); diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/LocationNode.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/LocationNode.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/LocationNode.java Mon Aug 08 23:12:54 2011 +0200 @@ -32,6 +32,11 @@ public final class LocationNode extends FloatingNode { @Input private Value index; + @Data private int displacement; + @Data private boolean indexScalingEnabled = true; + @Data private CiKind valueKind; + @Data private Object locationIdentity; + public Value index() { return index; } @@ -48,11 +53,6 @@ return elementKind; } - private int displacement; - private boolean indexScalingEnabled = true; - private CiKind valueKind; - private Object locationIdentity; - public int displacement() { return displacement; } @@ -111,7 +111,7 @@ if (this.index() != null) { indexValue = lirGenerator.load(this.index()); if (indexScalingEnabled) { - indexScale = Scale.fromInt(valueKind.sizeInBytes(lirGenerator.target().wordSize)); + indexScale = Scale.fromInt(valueKind.sizeInBytes(lirGenerator.target().wordSize)); } } return new CiAddress(valueKind, lirGenerator.load(object), indexValue, indexScale, displacement); @@ -120,18 +120,4 @@ public Object locationIdentity() { return locationIdentity; } - - @Override - public boolean valueEqual(Node i) { - if (i instanceof LocationNode) { - LocationNode locationNode = (LocationNode) i; - return locationNode.locationIdentity == locationIdentity && locationNode.displacement == displacement; - } - return false; - } - - @Override - public int valueNumber() { - return locationIdentity.hashCode() + displacement; - } } diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/MaterializeNode.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/MaterializeNode.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/MaterializeNode.java Mon Aug 08 23:12:54 2011 +0200 @@ -33,11 +33,6 @@ } @Override - public boolean valueEqual(Node i) { - return (i instanceof MaterializeNode); - } - - @Override public void print(LogStream out) { out.print("materialize(").print(condition().toString()).print(')'); } diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/MathIntrinsic.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/MathIntrinsic.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/MathIntrinsic.java Mon Aug 08 23:12:54 2011 +0200 @@ -22,25 +22,23 @@ */ package com.oracle.max.graal.compiler.ir; -import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.graph.*; -import com.sun.cri.ci.*; +import com.oracle.max.graal.graph.Node.*; -public class MathIntrinsic extends FloatingNode { +public class MathIntrinsic extends FloatingNode implements GlobalValueNumberable { + + @Input private Value x; + @Data private final Operation operation; public enum Operation { ABS, SQRT, } - @Input private Value x; - - private final Operation operation; - public Value x() { return x; } - public void setX(Value x) { + private void setX(Value x) { updateUsages(this.x, x); this.x = x; } @@ -55,34 +53,8 @@ this.operation = op; } - // for copying - private MathIntrinsic(CiKind kind, Operation op, Graph graph) { - super(kind, graph); - this.operation = op; - } - @Override public void accept(ValueVisitor v) { v.visitMathIntrinsic(this); } - - @Override - public int valueNumber() { - return Util.hash1(operation.hashCode(), x); - } - - @Override - public boolean valueEqual(Node i) { - if (i instanceof MathIntrinsic) { - MathIntrinsic mi = (MathIntrinsic) i; - return (operation() == mi.operation && x() == mi.x()); - } - return false; - } - - @Override - public Node copy(Graph into) { - return new MathIntrinsic(kind, operation, into); - } - } diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Negate.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Negate.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Negate.java Mon Aug 08 23:12:54 2011 +0200 @@ -25,15 +25,13 @@ import com.oracle.max.graal.compiler.debug.*; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.NotifyReProcess; import com.oracle.max.graal.compiler.phases.CanonicalizerPhase.*; -import com.oracle.max.graal.compiler.util.*; import com.oracle.max.graal.graph.*; -import com.sun.cri.bytecode.*; import com.sun.cri.ci.*; /** * The {@code NegateOp} instruction negates its operand. */ -public final class Negate extends FloatingNode { +public final class Negate extends FloatingNode implements Node.GlobalValueNumberable { private static final NegateCanonicalizerOp CANONICALIZER = new NegateCanonicalizerOp(); @Input private Value x; @@ -67,20 +65,6 @@ } @Override - public int valueNumber() { - return Util.hash1(Bytecodes.INEG, x()); - } - - @Override - public boolean valueEqual(Node i) { - if (i instanceof Negate) { - Negate o = (Negate) i; - return x() == o.x(); - } - return false; - } - - @Override public void print(LogStream out) { out.print("- ").print(x()); } diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NegateBooleanNode.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NegateBooleanNode.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/NegateBooleanNode.java Mon Aug 08 23:12:54 2011 +0200 @@ -51,11 +51,6 @@ } @Override - public boolean valueEqual(Node i) { - return i instanceof NegateBooleanNode; - } - - @Override public void print(LogStream out) { out.print(value()).print("!"); } diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ReadNode.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ReadNode.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ReadNode.java Mon Aug 08 23:12:54 2011 +0200 @@ -27,7 +27,7 @@ import com.sun.cri.ci.*; -public final class ReadNode extends AccessNode { +public final class ReadNode extends AccessNode implements Node.GlobalValueNumberable { public ReadNode(CiKind kind, Value object, LocationNode location, Graph graph) { super(kind, object, location, graph); @@ -44,11 +44,6 @@ } @Override - public boolean valueEqual(Node i) { - return i instanceof ReadNode; - } - - @Override public Node copy(Graph into) { ReadNode x = new ReadNode(super.kind, null, null, into); super.copyInto(x); diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Value.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Value.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Value.java Mon Aug 08 23:12:54 2011 +0200 @@ -40,7 +40,7 @@ * The kind of this value. This is {@link CiKind#Void} for instructions that produce no value. * This kind is guaranteed to be a {@linkplain CiKind#stackKind() stack kind}. */ - public final CiKind kind; + @Data public final CiKind kind; protected CiValue operand = CiValue.IllegalValue; diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/nodes/CurrentThread.java --- a/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/nodes/CurrentThread.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/nodes/CurrentThread.java Mon Aug 08 23:12:54 2011 +0200 @@ -30,7 +30,7 @@ import com.sun.cri.ci.*; -public final class CurrentThread extends FloatingNode { +public final class CurrentThread extends FloatingNode implements Node.GlobalValueNumberable { private int threadObjectOffset; @@ -56,11 +56,6 @@ } @Override - public boolean valueEqual(Node i) { - return i instanceof CurrentThread; - } - - @Override public void print(LogStream out) { out.print("currentThread"); } diff -r eb3e8ea2956a -r 4275ca8dde2b graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/nodes/FPConversionNode.java --- a/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/nodes/FPConversionNode.java Mon Aug 08 22:24:44 2011 +0200 +++ b/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/nodes/FPConversionNode.java Mon Aug 08 23:12:54 2011 +0200 @@ -31,7 +31,7 @@ import com.sun.cri.ci.*; -public final class FPConversionNode extends FloatingNode { +public final class FPConversionNode extends FloatingNode implements Node.GlobalValueNumberable { @Input private Value value; public Value value() { @@ -62,11 +62,6 @@ } @Override - public boolean valueEqual(Node i) { - return i instanceof FPConversionNode && ((FPConversionNode) i).kind == kind; - } - - @Override public void print(LogStream out) { out.print("fp conversion node ").print(value()); }