comparison graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java @ 2773:27512ea6bbcb

exception dispatch simplification: * BlockMap creates exception dispatch blocks (so they're iterated in the right order) * GraphBuilder uses exception dispatch blocks, simplified handleException, removed updateDispatchChain * simplified mergeOrClone * removed successor & predecessor methods from BlockBegin
author Lukas Stadler <lukas.stadler@jku.at>
date Tue, 24 May 2011 12:07:17 +0200
parents 6ab73784566a
children 93ec3f067420
comparison
equal deleted inserted replaced
2772:3e3338a1abb9 2773:27512ea6bbcb
49 public CriticalEdgeFinder(IR ir) { 49 public CriticalEdgeFinder(IR ir) {
50 this.ir = ir; 50 this.ir = ir;
51 } 51 }
52 52
53 public void apply(BlockBegin block) { 53 public void apply(BlockBegin block) {
54 if (block.numberOfSux() >= 2) { 54 BlockEnd end = block.end();
55 for (BlockBegin succ : block.end().blockSuccessors()) { 55 if (end.blockSuccessorCount() >= 2) {
56 for (BlockBegin succ : end.blockSuccessors()) {
56 if (succ.numberOfPreds() >= 2) { 57 if (succ.numberOfPreds() >= 2) {
57 // TODO: (tw) probably we don't have to make it a critical edge if succ only contains the _same_ predecessor multiple times. 58 // TODO: (tw) probably we don't have to make it a critical edge if succ only contains the _same_ predecessor multiple times.
58 recordCriticalEdge(block, succ); 59 recordCriticalEdge(block, succ);
59 } 60 }
60 } 61 }