Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java @ 2788:df4c5254c5cc
Towards goto removal.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 25 May 2011 14:33:44 +0200 |
parents | 79dda81dd337 |
children | aeccd2af4e9e |
comparison
equal
deleted
inserted
replaced
2785:847dcd4dbd4c | 2788:df4c5254c5cc |
---|---|
106 // This goto is not a safepoint. | 106 // This goto is not a safepoint. |
107 Goto e = new Goto(target.getInstructions().get(0), graph); | 107 Goto e = new Goto(target.getInstructions().get(0), graph); |
108 newSucc.getInstructions().add(e); | 108 newSucc.getInstructions().add(e); |
109 | 109 |
110 // link predecessor to new block | 110 // link predecessor to new block |
111 ((BlockEnd) source.getInstructions().get(source.getInstructions().size() - 1)).successors().replace(target.getInstructions().get(0), newSucc.getInstructions().get(0)); | 111 // if (source.getInstructions().size() > 0) { |
112 source.getInstructions().get(source.getInstructions().size() - 1).successors().replace(target.getInstructions().get(0), newSucc.getInstructions().get(0)); | |
113 // } | |
114 | |
112 | 115 |
113 source.substituteSuccessor(target, newSucc); | 116 source.substituteSuccessor(target, newSucc); |
114 target.substitutePredecessor(source, newSucc); | 117 target.substitutePredecessor(source, newSucc); |
115 newSucc.blockPredecessors().add(source); | 118 newSucc.blockPredecessors().add(source); |
116 newSucc.blockSuccessors().add(target); | 119 newSucc.blockSuccessors().add(target); |