Mercurial > hg > graal-compiler
diff graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java @ 2804:095162a84dcc
Introduced scheduling code.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 27 May 2011 18:44:13 +0200 |
parents | 2af109bec0c0 |
children | c3f64b66fc78 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java Fri May 27 18:14:36 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java Fri May 27 18:44:13 2011 +0200 @@ -108,6 +108,7 @@ Node sourceInstruction = source.getInstructions().get(source.getInstructions().size() - 1); Node targetInstruction = target.getInstructions().get(0); int sourceInstructionPredIndex = targetInstruction.predecessors().indexOf(sourceInstruction); + assert sourceInstructionPredIndex != -1 : "must find source instruction " + sourceInstruction + " in predecessor array of target instruction " + targetInstruction; int replacedIndex = targetInstruction.predecessorsIndex().get(sourceInstructionPredIndex); assert replacedIndex != -1 && sourceInstruction.successors().get(replacedIndex) != null; e.successors().setAndClear(1, sourceInstruction, replacedIndex);