Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2783:9bc0c2eb00d6
Made graph builder removal of BlockBegin work.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 25 May 2011 12:04:58 +0200 |
parents | bda5972a40a5 |
children | e62cfea1c134 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Wed May 25 11:15:24 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Wed May 25 12:04:58 2011 +0200 @@ -221,9 +221,9 @@ if (n instanceof Placeholder) { Placeholder p = (Placeholder) n; - if (p == graph.start().successors().get(0)) { + /*if (p == graph.start().successors().get(0)) { // nothing to do... - } else if (p.blockPredecessors().size() == 0) { + } else*/ if (p.blockPredecessors().size() == 0) { assert p.next() == null; p.delete(); } else { @@ -236,6 +236,12 @@ } } } + + for (Node n : graph.getNodes()) { + assert !(n instanceof Placeholder); + } + + for (Node n : graph.getNodes()) { if (n instanceof FrameState) { boolean delete = false; @@ -1089,7 +1095,9 @@ // go forward to the end of the block lastInstr = lastInstr.next(); } - frameState.initializeFrom(((BlockBegin) syncHandler.firstInstruction).stateBefore()); + +// TTY.println("first instruction: " + syncHandler.firstInstruction); + frameState.initializeFrom(((StateSplit) syncHandler.firstInstruction).stateBefore()); int bci = Instruction.SYNCHRONIZATION_ENTRY_BCI;