# HG changeset patch # User Thomas Wuerthinger # Date 1423871778 -3600 # Node ID aac293bfdced48f4d4bb0cd059801833a57018e5 # Parent 4d9ff841882c4f3754d9c63c27174b0410938962 Fix an issue that could lead to scheduling problems of box nodes after recent graph builder changes. diff -r 4d9ff841882c -r aac293bfdced graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Fri Feb 13 23:45:16 2015 +0100 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java Sat Feb 14 00:56:18 2015 +0100 @@ -1274,8 +1274,7 @@ * this block again. */ FixedNode targetNode; - if (isGoto && (block.getPredecessorCount() == 1 || !controlFlowSplit) && !block.isLoopHeader && (currentBlock.loops & ~block.loops) == 0 && - !(lastInstr instanceof AbstractMergeNode)) { + if (isGoto && (block.getPredecessorCount() == 1 || !controlFlowSplit) && !block.isLoopHeader && (currentBlock.loops & ~block.loops) == 0) { block.setFirstInstruction(operatingDimension, lastInstr); lastInstr = null; } else { @@ -1389,11 +1388,15 @@ currentBlock = block; if (lastInstr instanceof AbstractMergeNode) { - int bci = block.startBci; - if (block instanceof ExceptionDispatchBlock) { - bci = ((ExceptionDispatchBlock) block).deoptBci; + + AbstractMergeNode abstractMergeNode = (AbstractMergeNode) lastInstr; + if (abstractMergeNode.stateAfter() == null) { + int bci = block.startBci; + if (block instanceof ExceptionDispatchBlock) { + bci = ((ExceptionDispatchBlock) block).deoptBci; + } + abstractMergeNode.setStateAfter(frameState.create(bci)); } - ((AbstractMergeNode) lastInstr).setStateAfter(frameState.create(bci)); } if (block == returnBlock) {