Mercurial > hg > truffle
diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2793:d3fc4fe063bf
Rename BlockBegin to Merge, remove some Block related member from it. Made CFGPrinter work with the Block class from schedule
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Fri, 27 May 2011 11:08:55 +0200 |
parents | 6d14aa4fbf90 |
children | d6bf240963fb |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Thu May 26 11:55:16 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Fri May 27 11:08:55 2011 +0200 @@ -114,7 +114,7 @@ private final Graph graph; - private BlockBegin unwindBlock; + private Merge unwindBlock; /** * Creates a new, initialized, {@code GraphBuilder} instance for a given compilation. @@ -294,16 +294,16 @@ FrameState existingState = ((StateSplit) first).stateBefore(); if (existingState == null) { - assert first instanceof BlockBegin ^ !target.isLoopHeader : "isLoopHeader: " + target.isLoopHeader; + assert first instanceof Merge ^ !target.isLoopHeader : "isLoopHeader: " + target.isLoopHeader; // copy state because it is modified FrameState duplicate = newState.duplicate(bci); // if the block is a loop header, insert all necessary phis if (target.isLoopHeader) { - assert first instanceof BlockBegin; - insertLoopPhis((BlockBegin) first, duplicate); - ((BlockBegin) first).setStateBefore(duplicate); + assert first instanceof Merge; + insertLoopPhis((Merge) first, duplicate); + ((Merge) first).setStateBefore(duplicate); } else { ((StateSplit) first).setStateBefore(duplicate); } @@ -318,7 +318,7 @@ assert existingState.stackSize() == newState.stackSize(); if (first instanceof Placeholder) { - BlockBegin merge = new BlockBegin(existingState.bci, target.blockID, target.isLoopHeader, graph); + Merge merge = new Merge(existingState.bci, target.isLoopHeader, graph); Placeholder p = (Placeholder) first; assert p.next() == null; @@ -327,7 +327,7 @@ merge.setStateBefore(existingState); } - existingState.merge((BlockBegin) target.firstInstruction, newState); + existingState.merge((Merge) target.firstInstruction, newState); } for (int j = 0; j < frameState.localsSize() + frameState.stackSize(); ++j) { @@ -337,7 +337,7 @@ } } - private void insertLoopPhis(BlockBegin merge, FrameState newState) { + private void insertLoopPhis(Merge merge, FrameState newState) { int stackSize = newState.stackSize(); for (int i = 0; i < stackSize; i++) { // always insert phis for the stack @@ -1066,7 +1066,7 @@ if (block.firstInstruction == null) { if (block.isLoopHeader) { - block.firstInstruction = new BlockBegin(block.startBci, block.blockID, block.isLoopHeader, graph); + block.firstInstruction = new Merge(block.startBci, block.isLoopHeader, graph); } else { block.firstInstruction = new Placeholder(graph); }