Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java @ 2675:bcd20d26d52d
Refactoring of BlockMap so that it doesn't create BlockBegin objects, but maintains its own Block data structure
author | Christian.Wimmer@Oracle.com |
---|---|
date | Fri, 13 May 2011 13:59:32 -0700 |
parents | 35453d725a2a |
children | 0ea5f12e873a |
comparison
equal
deleted
inserted
replaced
2672:35453d725a2a | 2675:bcd20d26d52d |
---|---|
167 * @param osrBCI the OSR bytecode index; {@code -1} if this is not an OSR | 167 * @param osrBCI the OSR bytecode index; {@code -1} if this is not an OSR |
168 * @return the block map for the specified method | 168 * @return the block map for the specified method |
169 */ | 169 */ |
170 public BlockMap getBlockMap(RiMethod method) { | 170 public BlockMap getBlockMap(RiMethod method) { |
171 // PERF: cache the block map for methods that are compiled or inlined often | 171 // PERF: cache the block map for methods that are compiled or inlined often |
172 BlockMap map = new BlockMap(method, hir.numberOfBlocks(), graph); | 172 BlockMap map = new BlockMap(method); |
173 if (!map.build(C1XOptions.PhiLoopStores)) { | 173 map.build(); |
174 throw new CiBailout("build of BlockMap failed for " + method); | 174 if (compiler.isObserved()) { |
175 } else { | 175 String label = CiUtil.format("BlockListBuilder %f %r %H.%n(%p)", method, true); |
176 if (compiler.isObserved()) { | 176 compiler.fireCompilationEvent(new CompilationEvent(this, label, map, method.code().length)); |
177 String label = CiUtil.format("BlockListBuilder %f %r %H.%n(%p)", method, true); | 177 } |
178 compiler.fireCompilationEvent(new CompilationEvent(this, label, map, method.code().length)); | 178 stats.bytecodeCount += method.code().length; |
179 } | |
180 } | |
181 map.cleanup(); | |
182 stats.bytecodeCount += map.numberOfBytes(); | |
183 stats.blockCount += map.numberOfBlocks(); | |
184 return map; | 179 return map; |
185 } | 180 } |
186 | 181 |
187 /** | 182 /** |
188 * Returns the frame map of this compilation. | 183 * Returns the frame map of this compilation. |