comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2703:42450f536d24

More cleanup towards separation of graphbuilding<>graph<>lirgeneration
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 18 May 2011 17:04:47 +0200
parents d06cff53b77e
children d669ab61c7c7
comparison
equal deleted inserted replaced
2702:618f545fcac5 2703:42450f536d24
1044 curBlock = b; 1044 curBlock = b;
1045 frameState.initializeFrom(b.stateBefore()); 1045 frameState.initializeFrom(b.stateBefore());
1046 lastInstr = b; 1046 lastInstr = b;
1047 b.appendNext(null, -1); 1047 b.appendNext(null, -1);
1048 1048
1049 iterateBytecodesForBlock(b.bci(), false); 1049 iterateBytecodesForBlock(b.bci());
1050 } 1050 }
1051 } 1051 }
1052 } 1052 }
1053 1053
1054 private BlockEnd iterateBytecodesForBlock(int bci, boolean inliningIntoCurrentBlock) { 1054 private BlockEnd iterateBytecodesForBlock(int bci) {
1055 assert frameState != null; 1055 assert frameState != null;
1056 stream.setBCI(bci); 1056 stream.setBCI(bci);
1057 1057
1058 BlockBegin block = curBlock; 1058 BlockBegin block = curBlock;
1059 BlockEnd end = null; 1059 BlockEnd end = null;
1062 int endBCI = stream.endBCI(); 1062 int endBCI = stream.endBCI();
1063 boolean blockStart = true; 1063 boolean blockStart = true;
1064 1064
1065 while (bci < endBCI) { 1065 while (bci < endBCI) {
1066 BlockBegin nextBlock = blockAtOrNull(bci); 1066 BlockBegin nextBlock = blockAtOrNull(bci);
1067 if (bci == 0 && inliningIntoCurrentBlock) {
1068 if (!nextBlock.isParserLoopHeader()) {
1069 // Ignore the block boundary of the entry block of a method
1070 // being inlined unless the block is a loop header.
1071 nextBlock = null;
1072 blockStart = false;
1073 }
1074 }
1075 if (nextBlock != null && nextBlock != block) { 1067 if (nextBlock != null && nextBlock != block) {
1076 // we fell through to the next block, add a goto and break 1068 // we fell through to the next block, add a goto and break
1077 end = new Goto(nextBlock, null, false, graph); 1069 end = new Goto(nextBlock, null, false, graph);
1078 lastInstr = lastInstr.appendNext(end, prevBCI); 1070 lastInstr = lastInstr.appendNext(end, prevBCI);
1079 break; 1071 break;