comparison graal/GraalCompiler/src/com/sun/c1x/ir/Value.java @ 2805:c3f64b66fc78

Towards removing the next pointer from Constant and ArithmeticOp
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Fri, 27 May 2011 19:57:56 +0200
parents 095162a84dcc
children 015be60afcf3
comparison
equal deleted inserted replaced
2804:095162a84dcc 2805:c3f64b66fc78
53 * A mask of {@linkplain Flag flags} denoting extra properties of this value. 53 * A mask of {@linkplain Flag flags} denoting extra properties of this value.
54 */ 54 */
55 private int flags; 55 private int flags;
56 56
57 protected CiValue operand = CiValue.IllegalValue; 57 protected CiValue operand = CiValue.IllegalValue;
58
59 public abstract Merge block();
60 58
61 /** 59 /**
62 * Creates a new value with the specified kind. 60 * Creates a new value with the specified kind.
63 * @param kind the type of this value 61 * @param kind the type of this value
64 * @param inputCount 62 * @param inputCount
264 public final boolean isDeadPhi() { 262 public final boolean isDeadPhi() {
265 return checkFlag(Flag.PhiDead); 263 return checkFlag(Flag.PhiDead);
266 } 264 }
267 265
268 /** 266 /**
267 * Compute the value number of this Instruction. Local and global value numbering
268 * optimizations use a hash map, and the value number provides a hash code.
269 * If the instruction cannot be value numbered, then this method should return
270 * {@code 0}.
271 * @return the hashcode of this instruction
272 */
273 public int valueNumber() {
274 return 0;
275 }
276
277 /**
278 * Checks that this instruction is equal to another instruction for the purposes
279 * of value numbering.
280 * @param i the other instruction
281 * @return {@code true} if this instruction is equivalent to the specified
282 * instruction w.r.t. value numbering
283 */
284 public boolean valueEqual(Node i) {
285 return false;
286 }
287
288 /**
269 * This method supports the visitor pattern by accepting a visitor and calling the 289 * This method supports the visitor pattern by accepting a visitor and calling the
270 * appropriate {@code visit()} method. 290 * appropriate {@code visit()} method.
271 * 291 *
272 * @param v the visitor to accept 292 * @param v the visitor to accept
273 */ 293 */