470 MachConstantBaseNode* _mach_constant_base_node; // Constant table base node singleton.
471
472
473 // Blocked array of debugging and profiling information,
474 // tracked per node.
475 enum { _log2_node_notes_block_size = 8,
476 _node_notes_block_size = (1<<_log2_node_notes_block_size)
477 };
478 GrowableArray<Node_Notes*>* _node_note_array;
479 Node_Notes* _default_node_notes; // default notes for new nodes
480
481 // After parsing and every bulk phase we hang onto the Root instruction.
482 // The RootNode instruction is where the whole program begins. It produces
483 // the initial Control and BOTTOM for everybody else.
484
485 // Type management
486 Arena _Compile_types; // Arena for all types
487 Arena* _type_arena; // Alias for _Compile_types except in Initialize_shared()
488 Dict* _type_dict; // Intern table
489 CloneMap _clone_map; // used for recording history of cloned nodes
490 void* _type_hwm; // Last allocation (see Type::operator new/delete)
491 size_t _type_last_size; // Last allocation size (see Type::operator new/delete)
492 ciMethod* _last_tf_m; // Cache for
493 const TypeFunc* _last_tf; // TypeFunc::make
494 AliasType** _alias_types; // List of alias types seen so far.
495 int _num_alias_types; // Logical length of _alias_types
496 int _max_alias_types; // Physical length of _alias_types
497 AliasCacheEntry _alias_cache[AliasCacheSize]; // Gets aliases w/o data structure walking
498
499 // Parsing, optimization
500 PhaseGVN* _initial_gvn; // Results of parse-time PhaseGVN
501 Unique_Node_List* _for_igvn; // Initial work-list for next round of Iterative GVN
502 WarmCallInfo* _warm_calls; // Sorted work-list for heat-based inlining.
503
504 GrowableArray<CallGenerator*> _late_inlines; // List of CallGenerators to be revisited after
505 // main parsing has finished.
506 GrowableArray<CallGenerator*> _string_late_inlines; // same but for string operations
507
508 GrowableArray<CallGenerator*> _boxing_late_inlines; // same but for boxing operations
509
510 int _late_inlines_pos; // Where in the queue should the next late inlining candidate go (emulate depth first inlining)
985
986 Node_Notes* node_notes_at(int idx) {
987 return locate_node_notes(_node_note_array, idx, false);
988 }
989 inline bool set_node_notes_at(int idx, Node_Notes* value);
990
991 // Copy notes from source to dest, if they exist.
992 // Overwrite dest only if source provides something.
993 // Return true if information was moved.
994 bool copy_node_notes_to(Node* dest, Node* source);
995
996 // Workhorse function to sort out the blocked Node_Notes array:
997 inline Node_Notes* locate_node_notes(GrowableArray<Node_Notes*>* arr,
998 int idx, bool can_grow = false);
999
1000 void grow_node_notes(GrowableArray<Node_Notes*>* arr, int grow_by);
1001
1002 // Type management
1003 Arena* type_arena() { return _type_arena; }
1004 Dict* type_dict() { return _type_dict; }
1005 void* type_hwm() { return _type_hwm; }
1006 size_t type_last_size() { return _type_last_size; }
1007 int num_alias_types() { return _num_alias_types; }
1008
1009 void init_type_arena() { _type_arena = &_Compile_types; }
1010 void set_type_arena(Arena* a) { _type_arena = a; }
1011 void set_type_dict(Dict* d) { _type_dict = d; }
1012 void set_type_hwm(void* p) { _type_hwm = p; }
1013 void set_type_last_size(size_t sz) { _type_last_size = sz; }
1014
1015 const TypeFunc* last_tf(ciMethod* m) {
1016 return (m == _last_tf_m) ? _last_tf : NULL;
1017 }
1018 void set_last_tf(ciMethod* m, const TypeFunc* tf) {
1019 assert(m != NULL || tf == NULL, "");
1020 _last_tf_m = m;
1021 _last_tf = tf;
1022 }
1023
1024 AliasType* alias_type(int idx) { assert(idx < num_alias_types(), "oob"); return _alias_types[idx]; }
1025 AliasType* alias_type(const TypePtr* adr_type, ciField* field = NULL, bool uncached = false) { return find_alias_type(adr_type, false, field, uncached); }
1026 bool have_alias_type(const TypePtr* adr_type);
1027 AliasType* alias_type(ciField* field);
1028
1029 int get_alias_index(const TypePtr* at, bool uncached = false) { return alias_type(at, NULL, uncached)->index(); }
1030 const TypePtr* get_adr_type(uint aidx) { return alias_type(aidx)->adr_type(); }
1031 int get_general_index(uint aidx) { return alias_type(aidx)->general_index(); }
1032
|
470 MachConstantBaseNode* _mach_constant_base_node; // Constant table base node singleton.
471
472
473 // Blocked array of debugging and profiling information,
474 // tracked per node.
475 enum { _log2_node_notes_block_size = 8,
476 _node_notes_block_size = (1<<_log2_node_notes_block_size)
477 };
478 GrowableArray<Node_Notes*>* _node_note_array;
479 Node_Notes* _default_node_notes; // default notes for new nodes
480
481 // After parsing and every bulk phase we hang onto the Root instruction.
482 // The RootNode instruction is where the whole program begins. It produces
483 // the initial Control and BOTTOM for everybody else.
484
485 // Type management
486 Arena _Compile_types; // Arena for all types
487 Arena* _type_arena; // Alias for _Compile_types except in Initialize_shared()
488 Dict* _type_dict; // Intern table
489 CloneMap _clone_map; // used for recording history of cloned nodes
490 size_t _type_last_size; // Last allocation size (see Type::operator new/delete)
491 ciMethod* _last_tf_m; // Cache for
492 const TypeFunc* _last_tf; // TypeFunc::make
493 AliasType** _alias_types; // List of alias types seen so far.
494 int _num_alias_types; // Logical length of _alias_types
495 int _max_alias_types; // Physical length of _alias_types
496 AliasCacheEntry _alias_cache[AliasCacheSize]; // Gets aliases w/o data structure walking
497
498 // Parsing, optimization
499 PhaseGVN* _initial_gvn; // Results of parse-time PhaseGVN
500 Unique_Node_List* _for_igvn; // Initial work-list for next round of Iterative GVN
501 WarmCallInfo* _warm_calls; // Sorted work-list for heat-based inlining.
502
503 GrowableArray<CallGenerator*> _late_inlines; // List of CallGenerators to be revisited after
504 // main parsing has finished.
505 GrowableArray<CallGenerator*> _string_late_inlines; // same but for string operations
506
507 GrowableArray<CallGenerator*> _boxing_late_inlines; // same but for boxing operations
508
509 int _late_inlines_pos; // Where in the queue should the next late inlining candidate go (emulate depth first inlining)
984
985 Node_Notes* node_notes_at(int idx) {
986 return locate_node_notes(_node_note_array, idx, false);
987 }
988 inline bool set_node_notes_at(int idx, Node_Notes* value);
989
990 // Copy notes from source to dest, if they exist.
991 // Overwrite dest only if source provides something.
992 // Return true if information was moved.
993 bool copy_node_notes_to(Node* dest, Node* source);
994
995 // Workhorse function to sort out the blocked Node_Notes array:
996 inline Node_Notes* locate_node_notes(GrowableArray<Node_Notes*>* arr,
997 int idx, bool can_grow = false);
998
999 void grow_node_notes(GrowableArray<Node_Notes*>* arr, int grow_by);
1000
1001 // Type management
1002 Arena* type_arena() { return _type_arena; }
1003 Dict* type_dict() { return _type_dict; }
1004 size_t type_last_size() { return _type_last_size; }
1005 int num_alias_types() { return _num_alias_types; }
1006
1007 void init_type_arena() { _type_arena = &_Compile_types; }
1008 void set_type_arena(Arena* a) { _type_arena = a; }
1009 void set_type_dict(Dict* d) { _type_dict = d; }
1010 void set_type_last_size(size_t sz) { _type_last_size = sz; }
1011
1012 const TypeFunc* last_tf(ciMethod* m) {
1013 return (m == _last_tf_m) ? _last_tf : NULL;
1014 }
1015 void set_last_tf(ciMethod* m, const TypeFunc* tf) {
1016 assert(m != NULL || tf == NULL, "");
1017 _last_tf_m = m;
1018 _last_tf = tf;
1019 }
1020
1021 AliasType* alias_type(int idx) { assert(idx < num_alias_types(), "oob"); return _alias_types[idx]; }
1022 AliasType* alias_type(const TypePtr* adr_type, ciField* field = NULL, bool uncached = false) { return find_alias_type(adr_type, false, field, uncached); }
1023 bool have_alias_type(const TypePtr* adr_type);
1024 AliasType* alias_type(ciField* field);
1025
1026 int get_alias_index(const TypePtr* at, bool uncached = false) { return alias_type(at, NULL, uncached)->index(); }
1027 const TypePtr* get_adr_type(uint aidx) { return alias_type(aidx)->adr_type(); }
1028 int get_general_index(uint aidx) { return alias_type(aidx)->general_index(); }
1029
|