Mercurial > hg > truffle
diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2695:785e9ecdcc69
Removed the instruction substitutor.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 18 May 2011 15:03:45 +0200 |
parents | ed36daed4c43 |
children | d06cff53b77e |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Wed May 18 14:40:29 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Wed May 18 15:03:45 2011 +0200 @@ -147,11 +147,6 @@ flags |= Flag.NoSafepoints.mask; } - // 1. create the start block - ir.startBlock = new BlockBegin(0, ir.nextBlockNumber(), graph); - BlockBegin startBlock = ir.startBlock; - graph.root().setStart(startBlock); - // 2. compute the block map, setup exception handlers and get the entrypoint(s) BlockMap blockMap = compilation.getBlockMap(rootMethod); @@ -169,7 +164,11 @@ blockList[block.startBci] = blockBegin; } - BlockBegin stdEntry = blockList[0]; + + // 1. create the start block + ir.startBlock = new BlockBegin(0, ir.nextBlockNumber(), graph); + BlockBegin startBlock = ir.startBlock; + graph.root().setStart(startBlock); curBlock = startBlock; RiExceptionHandler[] handlers = rootMethod.exceptionHandlers(); @@ -195,12 +194,13 @@ lastInstr = startBlock; lastInstr.appendNext(null, -1); + BlockBegin entryBlock = blockList[0]; if (isSynchronized(rootMethod.accessFlags())) { // 4A.1 add a monitor enter to the start block rootMethodSynchronizedObject = synchronizedObject(frameState, compilation.method); genMonitorEnter(rootMethodSynchronizedObject, Instruction.SYNCHRONIZATION_ENTRY_BCI); // 4A.2 finish the start block - finishStartBlock(startBlock, stdEntry); + finishStartBlock(startBlock, entryBlock); // 4A.3 setup an exception handler to unlock the root method synchronized object syncHandler = new BlockBegin(Instruction.SYNCHRONIZATION_ENTRY_BCI, ir.nextBlockNumber(), graph); @@ -213,13 +213,13 @@ addExceptionHandler(h); } else { // 4B.1 simply finish the start block - finishStartBlock(startBlock, stdEntry); + finishStartBlock(startBlock, entryBlock); } // 5. SKIPPED: look for intrinsics // 6B.1 do the normal parsing - addToWorkList(stdEntry); + addToWorkList(entryBlock); iterateAllBlocks(); if (syncHandler != null && syncHandler.stateBefore() != null) {