Mercurial > hg > truffle
comparison src/share/vm/ci/ciMethodData.hpp @ 45:48a3fa21394b
6667615: (Escape Analysis) extend MDO to cache arguments escape state
Summary: Use MDO to cache arguments escape state determined by the byte code escape analyzer.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 11 Mar 2008 19:00:38 -0700 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
44:52fed2ec0afb | 45:48a3fa21394b |
---|---|
28 class ciReceiverTypeData; | 28 class ciReceiverTypeData; |
29 class ciRetData; | 29 class ciRetData; |
30 class ciBranchData; | 30 class ciBranchData; |
31 class ciArrayData; | 31 class ciArrayData; |
32 class ciMultiBranchData; | 32 class ciMultiBranchData; |
33 class ciArgInfoData; | |
33 | 34 |
34 typedef ProfileData ciProfileData; | 35 typedef ProfileData ciProfileData; |
35 | 36 |
36 class ciBitData : public BitData { | 37 class ciBitData : public BitData { |
37 public: | 38 public: |
119 class ciMultiBranchData : public MultiBranchData { | 120 class ciMultiBranchData : public MultiBranchData { |
120 public: | 121 public: |
121 ciMultiBranchData(DataLayout* layout) : MultiBranchData(layout) {}; | 122 ciMultiBranchData(DataLayout* layout) : MultiBranchData(layout) {}; |
122 }; | 123 }; |
123 | 124 |
125 class ciArgInfoData : public ArgInfoData { | |
126 public: | |
127 ciArgInfoData(DataLayout* layout) : ArgInfoData(layout) {}; | |
128 }; | |
129 | |
124 // ciMethodData | 130 // ciMethodData |
125 // | 131 // |
126 // This class represents a methodDataOop in the HotSpot virtual | 132 // This class represents a methodDataOop in the HotSpot virtual |
127 // machine. | 133 // machine. |
128 | 134 |
161 | 167 |
162 ciMethodData(methodDataHandle h_md); | 168 ciMethodData(methodDataHandle h_md); |
163 ciMethodData(); | 169 ciMethodData(); |
164 | 170 |
165 // Accessors | 171 // Accessors |
166 int data_size() { return _data_size; } | 172 int data_size() const { return _data_size; } |
167 int extra_data_size() { return _extra_data_size; } | 173 int extra_data_size() const { return _extra_data_size; } |
168 intptr_t * data() { return _data; } | 174 intptr_t * data() const { return _data; } |
169 | 175 |
170 methodDataOop get_methodDataOop() const { | 176 methodDataOop get_methodDataOop() const { |
171 if (handle() == NULL) return NULL; | 177 if (handle() == NULL) return NULL; |
172 methodDataOop mdo = (methodDataOop)get_oop(); | 178 methodDataOop mdo = (methodDataOop)get_oop(); |
173 assert(mdo != NULL, "illegal use of unloaded method data"); | 179 assert(mdo != NULL, "illegal use of unloaded method data"); |
176 | 182 |
177 const char* type_string() { return "ciMethodData"; } | 183 const char* type_string() { return "ciMethodData"; } |
178 | 184 |
179 void print_impl(outputStream* st); | 185 void print_impl(outputStream* st); |
180 | 186 |
181 DataLayout* data_layout_at(int data_index) { | 187 DataLayout* data_layout_at(int data_index) const { |
182 assert(data_index % sizeof(intptr_t) == 0, "unaligned"); | 188 assert(data_index % sizeof(intptr_t) == 0, "unaligned"); |
183 return (DataLayout*) (((address)_data) + data_index); | 189 return (DataLayout*) (((address)_data) + data_index); |
184 } | 190 } |
185 | 191 |
186 bool out_of_bounds(int data_index) { | 192 bool out_of_bounds(int data_index) { |
205 | 211 |
206 | 212 |
207 // What is the index of the first data entry? | 213 // What is the index of the first data entry? |
208 int first_di() { return 0; } | 214 int first_di() { return 0; } |
209 | 215 |
216 ciArgInfoData *arg_info() const; | |
217 | |
210 public: | 218 public: |
211 bool is_method_data() { return true; } | 219 bool is_method_data() { return true; } |
212 bool is_empty() { return _state == empty_state; } | 220 bool is_empty() { return _state == empty_state; } |
213 bool is_mature() { return _state == mature_state; } | 221 bool is_mature() { return _state == mature_state; } |
214 | 222 |
268 bool eflag_set(methodDataOopDesc::EscapeFlag f) const; | 276 bool eflag_set(methodDataOopDesc::EscapeFlag f) const; |
269 | 277 |
270 void set_arg_local(int i); | 278 void set_arg_local(int i); |
271 void set_arg_stack(int i); | 279 void set_arg_stack(int i); |
272 void set_arg_returned(int i); | 280 void set_arg_returned(int i); |
281 void set_arg_modified(int arg, uint val); | |
273 | 282 |
274 bool is_arg_local(int i) const; | 283 bool is_arg_local(int i) const; |
275 bool is_arg_stack(int i) const; | 284 bool is_arg_stack(int i) const; |
276 bool is_arg_returned(int i) const; | 285 bool is_arg_returned(int i) const; |
286 uint arg_modified(int arg) const; | |
277 | 287 |
278 // Code generation helper | 288 // Code generation helper |
279 ByteSize offset_of_slot(ciProfileData* data, ByteSize slot_offset_in_data); | 289 ByteSize offset_of_slot(ciProfileData* data, ByteSize slot_offset_in_data); |
280 int byte_offset_of_slot(ciProfileData* data, ByteSize slot_offset_in_data) { return in_bytes(offset_of_slot(data, slot_offset_in_data)); } | 290 int byte_offset_of_slot(ciProfileData* data, ByteSize slot_offset_in_data) { return in_bytes(offset_of_slot(data, slot_offset_in_data)); } |
281 | 291 |