Mercurial > hg > graal-compiler
changeset 5223:c4381dacfca6
Add peel method overload with SuperBlock parameter. Don't call normalizeLoopBegin.
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Tue, 10 Apr 2012 18:51:04 +0200 |
parents | b64933dc4830 |
children | e706b132f580 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/loop/LoopTransformUtil.java |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/loop/LoopTransformUtil.java Mon Apr 09 20:43:30 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/loop/LoopTransformUtil.java Tue Apr 10 18:51:04 2012 +0200 @@ -26,20 +26,21 @@ import com.oracle.graal.lir.cfg.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.util.*; public class LoopTransformUtil { public static void peel(Loop loop) { - GraphUtil.normalizeLoopBegin(loop.loopBegin()); - SuperBlock block = wholeLoop(loop); - SuperBlock peel = block.duplicate(); // duplicates the nodes, merges early exits + peel(loop, wholeLoop(loop)); + } + + public static void peel(Loop loop, SuperBlock wholeLoop) { + SuperBlock peel = wholeLoop.duplicate(); // duplicates the nodes, merges early exits peel.insertBefore(loop.loopBegin().forwardEnd()); // connects peeled part's CFG LoopTransformDataResolver resolver = new LoopTransformDataResolver(); - resolver.wholeLoop(block).peeled(peel); // block (comming from the loop) was peeled into peel + resolver.wholeLoop(wholeLoop).peeled(peel); // block (comming from the loop) was peeled into peel resolver.resolve(); peel.finish();