Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java @ 2801:2af109bec0c0
Make block contains a list of nodes instead a list of instructions.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 27 May 2011 15:11:34 +0200 |
parents | d6bf240963fb |
children | 095162a84dcc |
comparison
equal
deleted
inserted
replaced
2800:e3a0630a1dab | 2801:2af109bec0c0 |
---|---|
103 LIRBlock newSucc = new LIRBlock(lirBlocks.size()); | 103 LIRBlock newSucc = new LIRBlock(lirBlocks.size()); |
104 lirBlocks.add(newSucc); | 104 lirBlocks.add(newSucc); |
105 | 105 |
106 // This goto is not a safepoint. | 106 // This goto is not a safepoint. |
107 Anchor e = new Anchor(null, graph); | 107 Anchor e = new Anchor(null, graph); |
108 Instruction sourceInstruction = source.getInstructions().get(source.getInstructions().size() - 1); | 108 Node sourceInstruction = source.getInstructions().get(source.getInstructions().size() - 1); |
109 Instruction targetInstruction = target.getInstructions().get(0); | 109 Node targetInstruction = target.getInstructions().get(0); |
110 int sourceInstructionPredIndex = targetInstruction.predecessors().indexOf(sourceInstruction); | 110 int sourceInstructionPredIndex = targetInstruction.predecessors().indexOf(sourceInstruction); |
111 int replacedIndex = targetInstruction.predecessorsIndex().get(sourceInstructionPredIndex); | 111 int replacedIndex = targetInstruction.predecessorsIndex().get(sourceInstructionPredIndex); |
112 assert replacedIndex != -1 && sourceInstruction.successors().get(replacedIndex) != null; | 112 assert replacedIndex != -1 && sourceInstruction.successors().get(replacedIndex) != null; |
113 e.successors().setAndClear(1, sourceInstruction, replacedIndex); | 113 e.successors().setAndClear(1, sourceInstruction, replacedIndex); |
114 sourceInstruction.successors().set(replacedIndex, e); | 114 sourceInstruction.successors().set(replacedIndex, e); |