comparison graal/GraalCompiler/src/com/sun/c1x/graph/IR.java @ 2719:ae1c50a03297

Fixed regression.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Thu, 19 May 2011 16:26:32 +0200
parents c1ce2a53d6c3
children 173067211acb
comparison
equal deleted inserted replaced
2718:c1ce2a53d6c3 2719:ae1c50a03297
128 orderedBlocks.add(lirBlock); 128 orderedBlocks.add(lirBlock);
129 } 129 }
130 130
131 for (BlockBegin bb : blocks) { 131 for (BlockBegin bb : blocks) {
132 LIRBlock lirBlock = bb.lirBlock(); 132 LIRBlock lirBlock = bb.lirBlock();
133 for (Node n : bb.predecessors()) { 133 for (int i = 0; i < bb.numberOfPreds(); ++i) {
134 if (n instanceof BlockEnd) { 134 lirBlock.blockPredecessors().add(bb.predAt(i).block().lirBlock());
135 BlockEnd end = (BlockEnd) n; 135 }
136 lirBlock.blockPredecessors().add(end.block().lirBlock()); 136
137 } 137 for (int i = 0; i < bb.numberOfSux(); ++i) {
138 } 138 lirBlock.blockSuccessors().add(bb.suxAt(i).lirBlock());
139
140 for (Node n : bb.successors()) {
141 if (n instanceof BlockBegin) {
142 BlockBegin begin = (BlockBegin) n;
143 lirBlock.blockSuccessors().add(begin.lirBlock());
144 }
145 } 139 }
146 140
147 Instruction first = bb; 141 Instruction first = bb;
148 while (first != null) { 142 while (first != null) {
149 lirBlock.getInstructions().add(first); 143 lirBlock.getInstructions().add(first);
184 TTY.println(phase); 178 TTY.println(phase);
185 print(false); 179 print(false);
186 } 180 }
187 181
188 if (compilation.compiler.isObserved()) { 182 if (compilation.compiler.isObserved()) {
189 // TODO(tw): FIXME 183 compilation.compiler.fireCompilationEvent(new CompilationEvent(compilation, phase, getHIRStartBlock(), true, false));
190 // compilation.compiler.fireCompilationEvent(new CompilationEvent(compilation, phase, startBlock, true, false));
191 } 184 }
192 } 185 }
193 186
194 /** 187 /**
195 * Creates and inserts a new block between this block and the specified successor, 188 * Creates and inserts a new block between this block and the specified successor,