Mercurial > hg > graal-jvmci-8
diff 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 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java Thu May 12 17:57:58 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java Fri May 13 13:59:32 2011 -0700 @@ -169,18 +169,13 @@ */ public BlockMap getBlockMap(RiMethod method) { // PERF: cache the block map for methods that are compiled or inlined often - BlockMap map = new BlockMap(method, hir.numberOfBlocks(), graph); - if (!map.build(C1XOptions.PhiLoopStores)) { - throw new CiBailout("build of BlockMap failed for " + method); - } else { - if (compiler.isObserved()) { - String label = CiUtil.format("BlockListBuilder %f %r %H.%n(%p)", method, true); - compiler.fireCompilationEvent(new CompilationEvent(this, label, map, method.code().length)); - } + BlockMap map = new BlockMap(method); + map.build(); + if (compiler.isObserved()) { + String label = CiUtil.format("BlockListBuilder %f %r %H.%n(%p)", method, true); + compiler.fireCompilationEvent(new CompilationEvent(this, label, map, method.code().length)); } - map.cleanup(); - stats.bytecodeCount += map.numberOfBytes(); - stats.blockCount += map.numberOfBlocks(); + stats.bytecodeCount += method.code().length; return map; }