Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/graph/IR.java @ 2834:bfce42cd9c07
Graph duplication now passes all tests
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 31 May 2011 13:34:52 +0200 |
parents | bd17ac598c6e |
children | c1c8a0291771 |
comparison
equal
deleted
inserted
replaced
2829:27c00b180416 | 2834:bfce42cd9c07 |
---|---|
80 C1XTimers.HIR_CREATE.stop(); | 80 C1XTimers.HIR_CREATE.stop(); |
81 C1XTimers.HIR_OPTIMIZE.start(); | 81 C1XTimers.HIR_OPTIMIZE.start(); |
82 } | 82 } |
83 | 83 |
84 new PhiSimplifier(this); | 84 new PhiSimplifier(this); |
85 | |
86 // Graph newGraph = new Graph(); | |
87 // HashMap<Node, Node> replacement = new HashMap<Node, Node>(); | |
88 // replacement.put(compilation.graph.start(), newGraph.start()); | |
89 // replacement.put(compilation.graph.end(), newGraph.end()); | |
90 // newGraph.addDuplicate(compilation.graph.getNodes(), replacement); | |
91 // compilation.graph = newGraph; | |
92 | |
85 Schedule schedule = new Schedule(this.compilation.graph); | 93 Schedule schedule = new Schedule(this.compilation.graph); |
86 List<Block> blocks = schedule.getBlocks(); | 94 List<Block> blocks = schedule.getBlocks(); |
87 List<LIRBlock> lirBlocks = new ArrayList<LIRBlock>(); | 95 List<LIRBlock> lirBlocks = new ArrayList<LIRBlock>(); |
88 Map<Block, LIRBlock> map = new HashMap<Block, LIRBlock>(); | 96 Map<Block, LIRBlock> map = new HashMap<Block, LIRBlock>(); |
89 for (Block b : blocks) { | 97 for (Block b : blocks) { |
158 | 166 |
159 private void buildGraph() { | 167 private void buildGraph() { |
160 // Graph builder must set the startBlock and the osrEntryBlock | 168 // Graph builder must set the startBlock and the osrEntryBlock |
161 new GraphBuilder(compilation, this, compilation.graph).build(); | 169 new GraphBuilder(compilation, this, compilation.graph).build(); |
162 | 170 |
163 // Graph newGraph = new Graph(); | |
164 // HashMap<Node, Node> replacement = new HashMap<Node, Node>(); | |
165 // replacement.put(compilation.graph.start(), newGraph.start()); | |
166 // replacement.put(compilation.graph.end(), newGraph.end()); | |
167 // newGraph.addDuplicate(compilation.graph.getNodes(), replacement); | |
168 // | |
169 // compilation.graph = newGraph; | |
170 | |
171 verifyAndPrint("After graph building"); | 171 verifyAndPrint("After graph building"); |
172 | 172 |
173 if (C1XOptions.PrintCompilation) { | 173 if (C1XOptions.PrintCompilation) { |
174 TTY.print(String.format("%3d blocks | ", this.numberOfBlocks())); | 174 TTY.print(String.format("%3d blocks | ", this.numberOfBlocks())); |
175 } | 175 } |