Mercurial > hg > graal-compiler
diff graal/GraalCompiler/src/com/sun/c1x/graph/IR.java @ 2719:ae1c50a03297
Fixed regression.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Thu, 19 May 2011 16:26:32 +0200 |
parents | c1ce2a53d6c3 |
children | 173067211acb |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java Thu May 19 16:05:42 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java Thu May 19 16:26:32 2011 +0200 @@ -130,18 +130,12 @@ for (BlockBegin bb : blocks) { LIRBlock lirBlock = bb.lirBlock(); - for (Node n : bb.predecessors()) { - if (n instanceof BlockEnd) { - BlockEnd end = (BlockEnd) n; - lirBlock.blockPredecessors().add(end.block().lirBlock()); - } + for (int i = 0; i < bb.numberOfPreds(); ++i) { + lirBlock.blockPredecessors().add(bb.predAt(i).block().lirBlock()); } - for (Node n : bb.successors()) { - if (n instanceof BlockBegin) { - BlockBegin begin = (BlockBegin) n; - lirBlock.blockSuccessors().add(begin.lirBlock()); - } + for (int i = 0; i < bb.numberOfSux(); ++i) { + lirBlock.blockSuccessors().add(bb.suxAt(i).lirBlock()); } Instruction first = bb; @@ -186,8 +180,7 @@ } if (compilation.compiler.isObserved()) { - // TODO(tw): FIXME - // compilation.compiler.fireCompilationEvent(new CompilationEvent(compilation, phase, startBlock, true, false)); + compilation.compiler.fireCompilationEvent(new CompilationEvent(compilation, phase, getHIRStartBlock(), true, false)); } }