Mercurial > hg > truffle
diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2586:421da5f53b5e
more Op2 changes
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 05 May 2011 14:37:17 +0200 |
parents | 768d77a1c7af |
children | 51ebe5f0516f |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Thu May 05 14:12:19 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Thu May 05 14:37:17 2011 +0200 @@ -28,6 +28,7 @@ import java.lang.reflect.*; import java.util.*; +import com.oracle.graal.graph.*; import com.sun.c1x.*; import com.sun.c1x.debug.*; import com.sun.c1x.ir.*; @@ -122,6 +123,12 @@ boolean skipBlock; // skip processing of the rest of this block private Value rootMethodSynchronizedObject; + + + + private Graph graph = new Graph(); + + /** * Creates a new, initialized, {@code GraphBuilder} instance for a given compilation. * @@ -548,7 +555,7 @@ void genArithmeticOp(CiKind result, int opcode, CiKind x, CiKind y, FrameState state) { Value yValue = pop(y); Value xValue = pop(x); - Value result1 = append(new ArithmeticOp(opcode, result, xValue, yValue, isStrict(method().accessFlags()), state)); + Value result1 = append(new ArithmeticOp(opcode, result, xValue, yValue, isStrict(method().accessFlags()), state, graph)); push(result, result1); } @@ -560,19 +567,19 @@ Value s = ipop(); Value x = pop(kind); // note that strength reduction of e << K >>> K is correctly handled in canonicalizer now - push(kind, append(new ShiftOp(opcode, x, s))); + push(kind, append(new ShiftOp(opcode, x, s, graph))); } void genLogicOp(CiKind kind, int opcode) { Value y = pop(kind); Value x = pop(kind); - push(kind, append(new LogicOp(opcode, x, y))); + push(kind, append(new LogicOp(opcode, x, y, graph))); } void genCompareOp(CiKind kind, int opcode, CiKind resultKind) { Value y = pop(kind); Value x = pop(kind); - Value value = append(new CompareOp(opcode, resultKind, x, y)); + Value value = append(new CompareOp(opcode, resultKind, x, y, graph)); if (!resultKind.isVoid()) { ipush(value); } @@ -588,7 +595,7 @@ int delta = stream().readIncrement(); Value x = curState.localAt(index); Value y = append(Constant.forInt(delta)); - curState.storeLocal(index, append(new ArithmeticOp(IADD, CiKind.Int, x, y, isStrict(method().accessFlags()), null))); + curState.storeLocal(index, append(new ArithmeticOp(IADD, CiKind.Int, x, y, isStrict(method().accessFlags()), null, graph))); } void genGoto(int fromBCI, int toBCI) {