comparison graal/GraalCompiler/src/com/sun/c1x/ir/Value.java @ 2538:e1ba5a93e997

Clean up on Value class and LIRGenerator/LIRItem-related things.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Apr 2011 20:13:54 +0200
parents 4a016ff4d2df
children fa3bda50cbfd
comparison
equal deleted inserted replaced
2537:4a016ff4d2df 2538:e1ba5a93e997
31 import com.sun.cri.ri.*; 31 import com.sun.cri.ri.*;
32 32
33 /** 33 /**
34 * This class represents a value within the HIR graph, including local variables, phis, and 34 * This class represents a value within the HIR graph, including local variables, phis, and
35 * all other instructions. 35 * all other instructions.
36 *
37 * @author Ben L. Titzer
38 */ 36 */
39 public abstract class Value { 37 public abstract class Value {
40 /** 38
41 * An enumeration of flags on values.
42 */
43 public enum Flag { 39 public enum Flag {
44 NonNull, // this value is non-null 40 NonNull, // this value is non-null
45 41
46 NoNullCheck, // does not require null check 42 NoNullCheck, // does not require null check
47 NoStoreCheck, // does not require store check 43 NoStoreCheck, // does not require store check
48 NoBoundsCheck, // does not require bounds check 44 NoBoundsCheck, // does not require bounds check
49 NoZeroCheck, // divide or modulus cannot cause exception 45 NoZeroCheck, // divide or modulus cannot cause exception
50 46
51 NoReadBarrier, // does not require read barrier 47 NoReadBarrier, // does not require read barrier
52 NoWriteBarrier, // does not require write barrier 48 NoWriteBarrier, // does not require write barrier
53 NoDivSpecialCase, // divide or modulus cannot be special case of MIN_INT / -1
54 DirectCompare,
55 IsLoaded, // field or method is resolved and class is loaded and initialized 49 IsLoaded, // field or method is resolved and class is loaded and initialized
56 IsStatic, // field or method access is static
57 IsSafepoint, // branch is backward (safepoint)
58 IsStrictFP,
59 PreservesState, // intrinsic preserves state
60 UnorderedIsTrue,
61 NeedsPatching, 50 NeedsPatching,
62 LiveValue, // live because value is used 51 LiveValue, // live because value is used
63 LiveDeopt, // live for deoptimization 52 LiveDeopt, // live for deoptimization
64 LiveControl, // live for control dependencies 53 LiveControl, // live for control dependencies
65 LiveSideEffect, // live for possible side-effects only 54 LiveSideEffect, // live for possible side-effects only
90 * A mask of {@linkplain Flag flags} denoting extra properties of this value. 79 * A mask of {@linkplain Flag flags} denoting extra properties of this value.
91 */ 80 */
92 private int flags; 81 private int flags;
93 82
94 protected CiValue operand = CiValue.IllegalValue; 83 protected CiValue operand = CiValue.IllegalValue;
95
96 /**
97 * A cache for analysis information. Every optimization must reset this field to {@code null} once it has completed.
98 */
99 public Object optInfo;
100 84
101 /** 85 /**
102 * Used by {@link InstructionSubstituter}. 86 * Used by {@link InstructionSubstituter}.
103 */ 87 */
104 public Value subst; 88 public Value subst;