# HG changeset patch # User Thomas Wuerthinger # Date 1305818010 -7200 # Node ID 7e470e1cd3b63d35e5bcd9db256a25394cf9f0be # Parent 1ddcbcd33325f8d5cb6a22335d947132af437617 Removed special casing for exception phis in LIRGenerator. Removed dependency between LIRBlock.blockID and BlockBegin.blockID. diff -r 1ddcbcd33325 -r 7e470e1cd3b6 graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java --- a/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java Thu May 19 17:04:30 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java Thu May 19 17:13:30 2011 +0200 @@ -390,16 +390,6 @@ @Override public void visitExceptionObject(ExceptionObject x) { - - // no moves are created for phi functions at the begin of exception - // handlers, so assign operands manually here - currentBlock.stateBefore().forEachLivePhi(currentBlock.blockID(), new PhiProcedure() { - public boolean doPhi(Phi phi) { - operandForPhi(phi); - return true; - } - }); - XirSnippet snippet = xir.genExceptionObject(site(x)); emitXir(snippet, x, stateFor(x), null, true); } @@ -1442,7 +1432,7 @@ if (x instanceof ExceptionEdgeInstruction) { BlockBegin begin = ((ExceptionEdgeInstruction) x).exceptionEdge(); if (begin != null) { - exceptionEdge = begin.lirBlock(); + exceptionEdge = getLIRBlock(begin); } } return new LIRDebugInfo(state, exceptionEdge); diff -r 1ddcbcd33325 -r 7e470e1cd3b6 graal/GraalCompiler/src/com/sun/c1x/graph/IR.java --- a/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java Thu May 19 17:04:30 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java Thu May 19 17:13:30 2011 +0200 @@ -114,13 +114,15 @@ List blocks = computeLinearScanOrder.linearScanOrder(); orderedBlocks = new ArrayList(); + int z = 0; for (BlockBegin bb : blocks) { - LIRBlock lirBlock = new LIRBlock(bb.blockID); + LIRBlock lirBlock = new LIRBlock(z); bb.setLIRBlock(lirBlock); lirBlock.setLinearScanNumber(bb.linearScanNumber()); // TODO(tw): Initialize LIRBlock.linearScanLoopHeader and LIRBlock.linearScanLoopEnd lirBlock.setStateBefore(bb.stateBefore()); orderedBlocks.add(lirBlock); + ++z; } for (BlockBegin bb : blocks) { diff -r 1ddcbcd33325 -r 7e470e1cd3b6 graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java --- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java Thu May 19 17:04:30 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockBegin.java Thu May 19 17:13:30 2011 +0200 @@ -79,11 +79,6 @@ */ public final int blockID; - /** - * Denotes the current set of {@link BlockBegin.BlockFlag} settings. - */ - private int blockFlags; - private int depthFirstNumber; private int linearScanNumber; diff -r 1ddcbcd33325 -r 7e470e1cd3b6 graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java --- a/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java Thu May 19 17:04:30 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/value/FrameState.java Thu May 19 17:13:30 2011 +0200 @@ -381,27 +381,6 @@ } /** - * Traverses all live {@linkplain Phi phis} of a given block in this frame state. - * - * @param block only phis {@linkplain Phi#block() associated} with this block are traversed - * @param proc the call back invoked for each live phi traversed - */ - public final boolean forEachLivePhi(int blockID, PhiProcedure proc) { - for (int i = 0; i < valuesSize(); i++) { - Value instr = valueAt(i); - if (instr instanceof Phi && !instr.isDeadPhi()) { - Phi phi = (Phi) instr; - if (phi.block().blockID == blockID) { - if (!proc.doPhi(phi)) { - return false; - } - } - } - } - return true; - } - - /** * Checks whether this frame state has any {@linkplain Phi phi} statements. */ public boolean hasPhis() {