Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/graph/CriticalEdgeFinder.java @ 2804:095162a84dcc
Introduced scheduling code.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 27 May 2011 18:44:13 +0200 |
parents | 2af109bec0c0 |
children | c3f64b66fc78 |
comparison
equal
deleted
inserted
replaced
2803:6a1e5d7e1f4e | 2804:095162a84dcc |
---|---|
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 Node sourceInstruction = source.getInstructions().get(source.getInstructions().size() - 1); | 108 Node sourceInstruction = source.getInstructions().get(source.getInstructions().size() - 1); |
109 Node 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 assert sourceInstructionPredIndex != -1 : "must find source instruction " + sourceInstruction + " in predecessor array of target instruction " + targetInstruction; | |
111 int replacedIndex = targetInstruction.predecessorsIndex().get(sourceInstructionPredIndex); | 112 int replacedIndex = targetInstruction.predecessorsIndex().get(sourceInstructionPredIndex); |
112 assert replacedIndex != -1 && sourceInstruction.successors().get(replacedIndex) != null; | 113 assert replacedIndex != -1 && sourceInstruction.successors().get(replacedIndex) != null; |
113 e.successors().setAndClear(1, sourceInstruction, replacedIndex); | 114 e.successors().setAndClear(1, sourceInstruction, replacedIndex); |
114 sourceInstruction.successors().set(replacedIndex, e); | 115 sourceInstruction.successors().set(replacedIndex, e); |
115 newSucc.getInstructions().add(e); | 116 newSucc.getInstructions().add(e); |