comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2621:dd115f80acf8

changed stateAfter FrameState to successor (instead of input), checkstyle fixes, added fixed root node to graph
author Lukas Stadler <lukas.stadler@jku.at>
date Tue, 10 May 2011 11:55:12 +0200
parents 3558ca7088c0
children 91d3952f7eb7
comparison
equal deleted inserted replaced
2620:a7ae14997372 2621:dd115f80acf8
42 42
43 /** 43 /**
44 * The {@code GraphBuilder} class parses the bytecode of a method and builds the IR graph. 44 * The {@code GraphBuilder} class parses the bytecode of a method and builds the IR graph.
45 * A number of optimizations may be performed during parsing of the bytecode, including value 45 * A number of optimizations may be performed during parsing of the bytecode, including value
46 * numbering, inlining, constant folding, strength reduction, etc. 46 * numbering, inlining, constant folding, strength reduction, etc.
47 *
48 * @author Ben L. Titzer
49 * @author Doug Simon
50 */ 47 */
51 public final class GraphBuilder { 48 public final class GraphBuilder {
52 49
53 /** 50 /**
54 * The minimum value to which {@link C1XOptions#TraceBytecodeParserLevel} must be set to trace 51 * The minimum value to which {@link C1XOptions#TraceBytecodeParserLevel} must be set to trace
163 } 160 }
164 161
165 // 1. create the start block 162 // 1. create the start block
166 ir.startBlock = new BlockBegin(0, ir.nextBlockNumber(), graph); 163 ir.startBlock = new BlockBegin(0, ir.nextBlockNumber(), graph);
167 BlockBegin startBlock = ir.startBlock; 164 BlockBegin startBlock = ir.startBlock;
165 graph.root().setStart(startBlock);
168 166
169 // 2. compute the block map, setup exception handlers and get the entrypoint(s) 167 // 2. compute the block map, setup exception handlers and get the entrypoint(s)
170 blockMap = compilation.getBlockMap(rootMethod); 168 blockMap = compilation.getBlockMap(rootMethod);
171 BlockBegin stdEntry = blockMap.get(0); 169 BlockBegin stdEntry = blockMap.get(0);
172 curBlock = startBlock; 170 curBlock = startBlock;