comparison graal/GraalCompiler/src/com/sun/c1x/alloc/ControlFlowOptimizer.java @ 2581:4a36a0bd6d18

added GraalGraph to classpath, Node as superclass of Value
author Lukas Stadler <lukas.stadler@jku.at>
date Thu, 05 May 2011 13:27:48 +0200
parents 16b9a8b5ad39
children 6d19b4f476db
comparison
equal deleted inserted replaced
2579:4984c8ebd6c7 2581:4a36a0bd6d18
146 if (block.checkBlockFlag(BlockBegin.BlockFlag.BackwardBranchTarget)) { 146 if (block.checkBlockFlag(BlockBegin.BlockFlag.BackwardBranchTarget)) {
147 newTarget.setBlockFlag(BlockBegin.BlockFlag.BackwardBranchTarget); 147 newTarget.setBlockFlag(BlockBegin.BlockFlag.BackwardBranchTarget);
148 } 148 }
149 149
150 // update the block references in any branching LIR instructions 150 // update the block references in any branching LIR instructions
151 for (BlockBegin pred : block.predecessors()) { 151 for (BlockBegin pred : block.blockPredecessors()) {
152 for (LIRInstruction instr : pred.lir().instructionsList()) { 152 for (LIRInstruction instr : pred.lir().instructionsList()) {
153 if (instr instanceof LIRBranch) { 153 if (instr instanceof LIRBranch) {
154 ((LIRBranch) instr).substitute(block, newTarget); 154 ((LIRBranch) instr).substitute(block, newTarget);
155 } else if (instr instanceof LIRTableSwitch) { 155 } else if (instr instanceof LIRTableSwitch) {
156 ((LIRTableSwitch) instr).substitute(block, newTarget); 156 ((LIRTableSwitch) instr).substitute(block, newTarget);
267 assert opBranch.block() == null || code.contains(opBranch.block()) : "missing successor branch from: " + block + " to: " + opBranch.block(); 267 assert opBranch.block() == null || code.contains(opBranch.block()) : "missing successor branch from: " + block + " to: " + opBranch.block();
268 assert opBranch.unorderedBlock() == null || code.contains(opBranch.unorderedBlock()) : "missing successor branch from: " + block + " to: " + opBranch.unorderedBlock(); 268 assert opBranch.unorderedBlock() == null || code.contains(opBranch.unorderedBlock()) : "missing successor branch from: " + block + " to: " + opBranch.unorderedBlock();
269 } 269 }
270 } 270 }
271 271
272 for (BlockBegin sux : block.end().successors()) { 272 for (BlockBegin sux : block.end().blockSuccessors()) {
273 assert code.contains(sux) : "missing successor from: " + block + "to: " + sux; 273 assert code.contains(sux) : "missing successor from: " + block + "to: " + sux;
274 } 274 }
275 275
276 for (BlockBegin pred : block.predecessors()) { 276 for (BlockBegin pred : block.blockPredecessors()) {
277 assert code.contains(pred) : "missing predecessor from: " + block + "to: " + pred; 277 assert code.contains(pred) : "missing predecessor from: " + block + "to: " + pred;
278 } 278 }
279 } 279 }
280 280
281 return true; 281 return true;