Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/graph/BlockMap.java @ 2602:0c6564c254af
new node layout: BlockBegin, BlockEnd
-Dc1x.dot=regex for pdf output
escape dot graph labels (<, >, &)
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 06 May 2011 10:25:37 +0200 |
parents | f6125fb5bfbc |
children | 8e44074058af |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/BlockMap.java Thu May 05 16:33:12 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/BlockMap.java Fri May 06 10:25:37 2011 +0200 @@ -26,6 +26,7 @@ import java.util.*; +import com.oracle.graal.graph.*; import com.sun.c1x.ir.*; import com.sun.c1x.util.*; import com.sun.cri.bytecode.*; @@ -115,8 +116,6 @@ * * If the {@code computeStoresInLoops} argument to {@code build} is true, the {@code loopBlocks} list is processed to * mark all local variables that are stored in the blocks in the list. - * - * @author Ben L. Titzer */ public final class BlockMap { @@ -222,12 +221,16 @@ */ private int blockNum; + private final Graph graph; + /** * Creates a new BlockMap instance from bytecode of the given method . * @param method the compiler interface method containing the code * @param firstBlockNum the first block number to use when creating {@link BlockBegin} nodes + * @param graph */ - public BlockMap(RiMethod method, int firstBlockNum) { + public BlockMap(RiMethod method, int firstBlockNum, Graph graph) { + this.graph = graph; byte[] code = method.code(); this.code = code; firstBlock = firstBlockNum; @@ -265,7 +268,7 @@ BlockBegin make(int bci) { BlockBegin block = blockMap[bci]; if (block == null) { - block = new BlockBegin(bci, blockNum++); + block = new BlockBegin(bci, blockNum++, graph); blockMap[bci] = block; } return block;