Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2756:bfcdda4fdd73
Removed the direct connection between BlockBegin and BlockEnd.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 20 May 2011 14:51:45 +0200 |
parents | 0d268cf66e24 |
children | 152b98832b0e |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Fri May 20 14:34:36 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Fri May 20 14:51:45 2011 +0200 @@ -257,7 +257,6 @@ Instruction target = createTargetAt(0, stateAfter); Goto base = new Goto(target, stateAfter, graph); appendWithBCI(base); - ((BlockBegin) startBlock.firstInstruction).setEnd(base); } public void mergeOrClone(Block target, FrameStateAccess newState) { @@ -375,7 +374,6 @@ unwindBlock = new BlockBegin(bci, ir.nextBlockNumber(), graph); Unwind unwind = new Unwind(null, graph); unwindBlock.appendNext(unwind); - unwindBlock.setEnd(unwind); } successor = unwindBlock; } @@ -403,13 +401,11 @@ ExceptionDispatch end = new ExceptionDispatch(null, entry, null, handler, null, graph); end.setBlockSuccessor(0, successor); dispatchEntry.appendNext(end); - dispatchEntry.setEnd(end); } else { Deoptimize deopt = new Deoptimize(graph); dispatchEntry.appendNext(deopt); Goto end = new Goto(successor, null, graph); deopt.appendNext(end); - dispatchEntry.setEnd(end); } newBlocks.add(dispatchEntry); @@ -426,7 +422,6 @@ FrameState stateWithException = entryState.duplicateModified(bci, CiKind.Void, exception); BlockEnd end = new Goto(successor, stateWithException, graph); exception.appendNext(end); - entry.setEnd(end); if (x instanceof Invoke) { ((Invoke) x).setExceptionEdge(entry); @@ -1165,7 +1160,6 @@ genThrow(bci); BlockEnd end = (BlockEnd) lastInstr; - ((BlockBegin) syncHandler.firstInstruction).setEnd(end); end.setStateAfter(frameState.create(bci())); frameState.initializeFrom(origState); @@ -1178,7 +1172,8 @@ while ((block = removeFromWorkList()) != null) { // remove blocks that have no predecessors by the time it their bytecodes are parsed - if (block.firstInstruction.predecessors().size() == 0) { + Instruction firstInstruction = block.firstInstruction; + if (firstInstruction.predecessors().size() == 0) { markVisited(block); continue; } @@ -1186,9 +1181,9 @@ if (!isVisited(block)) { markVisited(block); // now parse the block - frameState.initializeFrom(((BlockBegin) block.firstInstruction).stateBefore()); - lastInstr = block.firstInstruction; - assert block.firstInstruction.next() == null; + frameState.initializeFrom(((BlockBegin) firstInstruction).stateBefore()); + lastInstr = firstInstruction; + assert firstInstruction.next() == null; iterateBytecodesForBlock(block); } @@ -1246,9 +1241,6 @@ assert end != null : "end should exist after iterating over bytecodes"; FrameState stateAtEnd = frameState.create(bci()); end.setStateAfter(stateAtEnd); - if (block.firstInstruction instanceof BlockBegin) { - ((BlockBegin) block.firstInstruction).setEnd(end); - } return end; }