55 class MachConstantBaseNode;
56 class MachNode;
57 class MachOper;
58 class MachSafePointNode;
59 class Node;
60 class Node_Array;
61 class Node_Notes;
62 class OptoReg;
63 class PhaseCFG;
64 class PhaseGVN;
65 class PhaseIterGVN;
66 class PhaseRegAlloc;
67 class PhaseCCP;
68 class PhaseCCP_DCE;
69 class RootNode;
70 class relocInfo;
71 class Scope;
72 class StartNode;
73 class SafePointNode;
74 class JVMState;
75 class TypeData;
76 class TypePtr;
77 class TypeOopPtr;
78 class TypeFunc;
79 class Unique_Node_List;
80 class nmethod;
81 class WarmCallInfo;
82 class Node_Stack;
83 struct Final_Reshape_Counts;
84
85 //------------------------------Compile----------------------------------------
86 // This class defines a top-level Compiler invocation.
87
88 class Compile : public Phase {
89 friend class VMStructs;
90
91 public:
92 // Fixed alias indexes. (See also MergeMemNode.)
93 enum {
94 AliasIdxTop = 1, // pseudo-index, aliases to nothing (used as sentinel value)
102 // (The time collection itself is always conditionalized on TimeCompiler.)
103 class TracePhase : public TraceTime {
104 private:
105 Compile* C;
106 CompileLog* _log;
107 const char* _phase_name;
108 bool _dolog;
109 public:
110 TracePhase(const char* name, elapsedTimer* accumulator, bool dolog);
111 ~TracePhase();
112 };
113
114 // Information per category of alias (memory slice)
115 class AliasType {
116 private:
117 friend class Compile;
118
119 int _index; // unique index, used with MergeMemNode
120 const TypePtr* _adr_type; // normalized address type
121 ciField* _field; // relevant instance field, or null if none
122 bool _is_rewritable; // false if the memory is write-once only
123 int _general_index; // if this is type is an instance, the general
124 // type that this is an instance of
125
126 void Init(int i, const TypePtr* at);
127
128 public:
129 int index() const { return _index; }
130 const TypePtr* adr_type() const { return _adr_type; }
131 ciField* field() const { return _field; }
132 bool is_rewritable() const { return _is_rewritable; }
133 bool is_volatile() const { return (_field ? _field->is_volatile() : false); }
134 int general_index() const { return (_general_index != 0) ? _general_index : _index; }
135
136 void set_rewritable(bool z) { _is_rewritable = z; }
137 void set_field(ciField* f) {
138 assert(!_field,"");
139 _field = f;
140 if (f->is_final()) _is_rewritable = false;
141 }
142
143 void print_on(outputStream* st) PRODUCT_RETURN;
144 };
145
146 enum {
147 logAliasCacheSize = 6,
148 AliasCacheSize = (1<<logAliasCacheSize)
149 };
150 struct AliasCacheEntry { const TypePtr* _adr_type; int _index; }; // simple duple type
151 enum {
152 trapHistLength = MethodData::_trap_hist_limit
153 };
154
155 // Constant entry of the constant table.
156 class Constant {
157 private:
158 BasicType _type;
159 union {
160 jvalue _value;
|
55 class MachConstantBaseNode;
56 class MachNode;
57 class MachOper;
58 class MachSafePointNode;
59 class Node;
60 class Node_Array;
61 class Node_Notes;
62 class OptoReg;
63 class PhaseCFG;
64 class PhaseGVN;
65 class PhaseIterGVN;
66 class PhaseRegAlloc;
67 class PhaseCCP;
68 class PhaseCCP_DCE;
69 class RootNode;
70 class relocInfo;
71 class Scope;
72 class StartNode;
73 class SafePointNode;
74 class JVMState;
75 class Type;
76 class TypeData;
77 class TypePtr;
78 class TypeOopPtr;
79 class TypeFunc;
80 class Unique_Node_List;
81 class nmethod;
82 class WarmCallInfo;
83 class Node_Stack;
84 struct Final_Reshape_Counts;
85
86 //------------------------------Compile----------------------------------------
87 // This class defines a top-level Compiler invocation.
88
89 class Compile : public Phase {
90 friend class VMStructs;
91
92 public:
93 // Fixed alias indexes. (See also MergeMemNode.)
94 enum {
95 AliasIdxTop = 1, // pseudo-index, aliases to nothing (used as sentinel value)
103 // (The time collection itself is always conditionalized on TimeCompiler.)
104 class TracePhase : public TraceTime {
105 private:
106 Compile* C;
107 CompileLog* _log;
108 const char* _phase_name;
109 bool _dolog;
110 public:
111 TracePhase(const char* name, elapsedTimer* accumulator, bool dolog);
112 ~TracePhase();
113 };
114
115 // Information per category of alias (memory slice)
116 class AliasType {
117 private:
118 friend class Compile;
119
120 int _index; // unique index, used with MergeMemNode
121 const TypePtr* _adr_type; // normalized address type
122 ciField* _field; // relevant instance field, or null if none
123 const Type* _element; // relevant array element type, or null if none
124 bool _is_rewritable; // false if the memory is write-once only
125 int _general_index; // if this is type is an instance, the general
126 // type that this is an instance of
127
128 void Init(int i, const TypePtr* at);
129
130 public:
131 int index() const { return _index; }
132 const TypePtr* adr_type() const { return _adr_type; }
133 ciField* field() const { return _field; }
134 const Type* element() const { return _element; }
135 bool is_rewritable() const { return _is_rewritable; }
136 bool is_volatile() const { return (_field ? _field->is_volatile() : false); }
137 int general_index() const { return (_general_index != 0) ? _general_index : _index; }
138
139 void set_rewritable(bool z) { _is_rewritable = z; }
140 void set_field(ciField* f) {
141 assert(!_field,"");
142 _field = f;
143 if (f->is_final() || f->is_stable()) {
144 // In the case of @Stable, multiple writes are possible but may be assumed to be no-ops.
145 _is_rewritable = false;
146 }
147 }
148 void set_element(const Type* e) {
149 assert(_element == NULL, "");
150 _element = e;
151 }
152
153 void print_on(outputStream* st) PRODUCT_RETURN;
154 };
155
156 enum {
157 logAliasCacheSize = 6,
158 AliasCacheSize = (1<<logAliasCacheSize)
159 };
160 struct AliasCacheEntry { const TypePtr* _adr_type; int _index; }; // simple duple type
161 enum {
162 trapHistLength = MethodData::_trap_hist_limit
163 };
164
165 // Constant entry of the constant table.
166 class Constant {
167 private:
168 BasicType _type;
169 union {
170 jvalue _value;
|