comparison graal/GraalCompiler/src/com/sun/c1x/ir/If.java @ 2827:bd17ac598c6e

Graph cloning, initial version (not completely working)
author Lukas Stadler <lukas.stadler@jku.at>
date Mon, 30 May 2011 18:46:57 +0200
parents d3fc4fe063bf
children bfce42cd9c07
comparison
equal deleted inserted replaced
2821:015be60afcf3 2827:bd17ac598c6e
82 * @param stateAfter the state before the branch but after the input values have been popped 82 * @param stateAfter the state before the branch but after the input values have been popped
83 * @param graph 83 * @param graph
84 */ 84 */
85 public If(Value x, Condition cond, Value y, Graph graph) { 85 public If(Value x, Condition cond, Value y, Graph graph) {
86 super(CiKind.Illegal, 2, INPUT_COUNT, SUCCESSOR_COUNT, graph); 86 super(CiKind.Illegal, 2, INPUT_COUNT, SUCCESSOR_COUNT, graph);
87 assert Util.archKindsEqual(x, y); 87 assert (x == null && y == null) || Util.archKindsEqual(x, y);
88 condition = cond; 88 condition = cond;
89 setX(x); 89 setX(x);
90 setY(y); 90 setY(y);
91 } 91 }
92 92
185 @Override 185 @Override
186 public String shortName() { 186 public String shortName() {
187 return "If " + condition.operator; 187 return "If " + condition.operator;
188 } 188 }
189 189
190 190 @Override
191 public Node copy(Graph into) {
192 If x = new If(null, condition, null, into);
193 x.unorderedIsTrue = unorderedIsTrue;
194 x.setNonNull(isNonNull());
195 return x;
196 }
191 } 197 }