Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/ir/ArithmeticOp.java @ 2622:91d3952f7eb7
Framestate work : using stateAFter and reducting the number of nodes with framestates. Intermediate state (does not pass tests)
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 10 May 2011 12:37:46 +0200 |
parents | 3558ca7088c0 |
children | 440ceca8e3d7 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/ArithmeticOp.java Tue May 10 11:55:12 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/ir/ArithmeticOp.java Tue May 10 12:37:46 2011 +0200 @@ -24,7 +24,6 @@ import com.oracle.graal.graph.*; import com.sun.c1x.debug.*; -import com.sun.c1x.value.*; import com.sun.cri.bytecode.*; import com.sun.cri.ci.*; @@ -33,33 +32,10 @@ */ public final class ArithmeticOp extends Op2 { - private static final int INPUT_COUNT = 1; - private static final int INPUT_STATE_BEFORE = 0; - + private static final int INPUT_COUNT = 0; private static final int SUCCESSOR_COUNT = 0; - @Override - protected int inputCount() { - return super.inputCount() + INPUT_COUNT; - } - - @Override - protected int successorCount() { - return super.successorCount() + SUCCESSOR_COUNT; - } - - /** - * The state for this instruction. - */ - @Override - public FrameState stateBefore() { - return (FrameState) inputs().get(super.inputCount() + INPUT_STATE_BEFORE); - } - - private FrameState setStateBefore(FrameState n) { - return (FrameState) inputs().set(super.inputCount() + INPUT_STATE_BEFORE, n); - } - + private final boolean canTrap; private final boolean isStrictFP; /** @@ -71,10 +47,10 @@ * @param isStrictFP indicates this operation has strict rounding semantics * @param stateBefore the state for instructions that may trap */ - public ArithmeticOp(int opcode, CiKind kind, Value x, Value y, boolean isStrictFP, FrameState stateBefore, Graph graph) { + public ArithmeticOp(int opcode, CiKind kind, Value x, Value y, boolean isStrictFP, boolean canTrap, Graph graph) { super(kind, opcode, x, y, INPUT_COUNT, SUCCESSOR_COUNT, graph); this.isStrictFP = isStrictFP; - setStateBefore(stateBefore); + this.canTrap = canTrap; } /** @@ -92,7 +68,7 @@ */ @Override public boolean canTrap() { - return stateBefore() != null; + return canTrap; } @Override