6667615: (Escape Analysis) extend MDO to cache arguments escape state

Use MDO to cache arguments escape state determined by the byte code escape analyzer.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2008-03-11 19:00:38 -07:00
parent 96e8bcb6aa
commit b64d5e4209
8 changed files with 306 additions and 29 deletions

View file

@ -30,6 +30,7 @@ class ciRetData;
class ciBranchData;
class ciArrayData;
class ciMultiBranchData;
class ciArgInfoData;
typedef ProfileData ciProfileData;
@ -121,6 +122,11 @@ public:
ciMultiBranchData(DataLayout* layout) : MultiBranchData(layout) {};
};
class ciArgInfoData : public ArgInfoData {
public:
ciArgInfoData(DataLayout* layout) : ArgInfoData(layout) {};
};
// ciMethodData
//
// This class represents a methodDataOop in the HotSpot virtual
@ -163,9 +169,9 @@ private:
ciMethodData();
// Accessors
int data_size() { return _data_size; }
int extra_data_size() { return _extra_data_size; }
intptr_t * data() { return _data; }
int data_size() const { return _data_size; }
int extra_data_size() const { return _extra_data_size; }
intptr_t * data() const { return _data; }
methodDataOop get_methodDataOop() const {
if (handle() == NULL) return NULL;
@ -178,7 +184,7 @@ private:
void print_impl(outputStream* st);
DataLayout* data_layout_at(int data_index) {
DataLayout* data_layout_at(int data_index) const {
assert(data_index % sizeof(intptr_t) == 0, "unaligned");
return (DataLayout*) (((address)_data) + data_index);
}
@ -207,6 +213,8 @@ private:
// What is the index of the first data entry?
int first_di() { return 0; }
ciArgInfoData *arg_info() const;
public:
bool is_method_data() { return true; }
bool is_empty() { return _state == empty_state; }
@ -270,10 +278,12 @@ public:
void set_arg_local(int i);
void set_arg_stack(int i);
void set_arg_returned(int i);
void set_arg_modified(int arg, uint val);
bool is_arg_local(int i) const;
bool is_arg_stack(int i) const;
bool is_arg_returned(int i) const;
uint arg_modified(int arg) const;
// Code generation helper
ByteSize offset_of_slot(ciProfileData* data, ByteSize slot_offset_in_data);