Mercurial > hg > graal-compiler
diff graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java @ 2674:6ab73784566a
* BlockBegin.predecessors changed to List<BlockEnd>
* Node: add input/successor with given back edge index, allows for explicit ordering of predecessors/usages
* Graphviz: PDF output, option to omit FrameStates
* runscimark.sh: forward additional options to JVM
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 13 May 2011 15:18:41 +0200 |
parents | 4a6518c4d17d |
children | 773189811d10 7ed72769d51a |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java Fri May 13 11:19:25 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java Fri May 13 15:18:41 2011 +0200 @@ -250,7 +250,7 @@ // recursive processing of all predecessors ends when start block of loop is reached if (cur != loopStart) { for (int j = cur.numberOfPreds() - 1; j >= 0; j--) { - BlockBegin pred = cur.predAt(j); + BlockBegin pred = cur.predAt(j).begin(); if (!isBlockInLoop(loopIdx, pred)) { // this predecessor has not been processed yet, so add it to work list @@ -539,14 +539,14 @@ BlockBegin block = linearScanOrder.get(i); assert block.numberOfPreds() > 0; - BlockBegin dominator = block.predAt(0); + BlockBegin dominator = block.predAt(0).begin(); if (block.isExceptionEntry()) { dominator = dominator.dominator(); } int numPreds = block.numberOfPreds(); for (int j = 1; j < numPreds; j++) { - BlockBegin curPred = block.predAt(j); + BlockBegin curPred = block.predAt(j).begin(); if (block.isExceptionEntry()) { curPred = curPred.dominator(); } @@ -615,7 +615,7 @@ if (cur.numberOfPreds() > 0) { TTY.print(" preds: "); for (int j = 0; j < cur.numberOfPreds(); j++) { - BlockBegin pred = cur.predAt(j); + BlockBegin pred = cur.predAt(j).begin(); TTY.print("B%d ", pred.blockID); } } @@ -666,16 +666,17 @@ } } - for (BlockBegin pred : cur.blockPredecessors()) { - assert pred.linearScanNumber() >= 0 && pred.linearScanNumber() == linearScanOrder.indexOf(pred) : "incorrect linearScanNumber"; + for (BlockEnd pred : cur.blockPredecessors()) { + BlockBegin begin = pred.begin(); + assert begin.linearScanNumber() >= 0 && begin.linearScanNumber() == linearScanOrder.indexOf(begin) : "incorrect linearScanNumber"; if (!cur.checkBlockFlag(BlockBegin.BlockFlag.LinearScanLoopHeader)) { - assert cur.linearScanNumber() > pred.linearScanNumber() : "invalid order"; + assert cur.linearScanNumber() > begin.linearScanNumber() : "invalid order"; } - if (cur.loopDepth() == pred.loopDepth()) { - assert cur.loopIndex() == pred.loopIndex() || cur.checkBlockFlag(BlockBegin.BlockFlag.LinearScanLoopHeader) : "successing blocks with same loop depth must have same loop index"; + if (cur.loopDepth() == begin.loopDepth()) { + assert cur.loopIndex() == begin.loopIndex() || cur.checkBlockFlag(BlockBegin.BlockFlag.LinearScanLoopHeader) : "successing blocks with same loop depth must have same loop index"; } - assert cur.dominator().linearScanNumber() <= pred.linearScanNumber() : "dominator must be before predecessors"; + assert cur.dominator().linearScanNumber() <= begin.linearScanNumber() : "dominator must be before predecessors"; } // check dominator @@ -684,7 +685,7 @@ } else { assert cur.dominator() != null : "all but first block must have dominator"; } - assert cur.numberOfPreds() != 1 || cur.dominator() == cur.predAt(0) || cur.isExceptionEntry() : "Single predecessor must also be dominator"; + assert cur.numberOfPreds() != 1 || cur.dominator() == cur.predAt(0).begin() || cur.isExceptionEntry() : "Single predecessor must also be dominator"; } // check that all loops are continuous