73 class PhaseCCP;
74 class PhaseCCP_DCE;
75 class RootNode;
76 class relocInfo;
77 class Scope;
78 class StartNode;
79 class SafePointNode;
80 class JVMState;
81 class Type;
82 class TypeData;
83 class TypeInt;
84 class TypePtr;
85 class TypeOopPtr;
86 class TypeFunc;
87 class Unique_Node_List;
88 class nmethod;
89 class WarmCallInfo;
90 class Node_Stack;
91 struct Final_Reshape_Counts;
92
93 typedef unsigned int node_idx_t;
94 class NodeCloneInfo {
95 private:
96 uint64_t _idx_clone_orig;
97 public:
98
99 void set_idx(node_idx_t idx) {
100 _idx_clone_orig = (_idx_clone_orig & CONST64(0xFFFFFFFF00000000)) | idx;
101 }
102 node_idx_t idx() const { return (node_idx_t)(_idx_clone_orig & 0xFFFFFFFF); }
103
104 void set_gen(int generation) {
105 uint64_t g = (uint64_t)generation << 32;
106 _idx_clone_orig = (_idx_clone_orig & 0xFFFFFFFF) | g;
107 }
108 int gen() const { return (int)(_idx_clone_orig >> 32); }
109
110 void set(uint64_t x) { _idx_clone_orig = x; }
111 void set(node_idx_t x, int g) { set_idx(x); set_gen(g); }
112 uint64_t get() const { return _idx_clone_orig; }
1067
1068 void process_print_inlining();
1069 void dump_print_inlining();
1070
1071 bool over_inlining_cutoff() const {
1072 if (!inlining_incrementally()) {
1073 return unique() > (uint)NodeCountInliningCutoff;
1074 } else {
1075 return live_nodes() > (uint)LiveNodeCountInliningCutoff;
1076 }
1077 }
1078
1079 void inc_number_of_mh_late_inlines() { _number_of_mh_late_inlines++; }
1080 void dec_number_of_mh_late_inlines() { assert(_number_of_mh_late_inlines > 0, "_number_of_mh_late_inlines < 0 !"); _number_of_mh_late_inlines--; }
1081 bool has_mh_late_inlines() const { return _number_of_mh_late_inlines > 0; }
1082
1083 void inline_incrementally_one(PhaseIterGVN& igvn);
1084 void inline_incrementally(PhaseIterGVN& igvn);
1085 void inline_string_calls(bool parse_time);
1086 void inline_boxing_calls(PhaseIterGVN& igvn);
1087
1088 // Matching, CFG layout, allocation, code generation
1089 PhaseCFG* cfg() { return _cfg; }
1090 bool select_24_bit_instr() const { return _select_24_bit_instr; }
1091 bool in_24_bit_fp_mode() const { return _in_24_bit_fp_mode; }
1092 bool has_java_calls() const { return _java_calls > 0; }
1093 int java_calls() const { return _java_calls; }
1094 int inner_loops() const { return _inner_loops; }
1095 Matcher* matcher() { return _matcher; }
1096 PhaseRegAlloc* regalloc() { return _regalloc; }
1097 int frame_slots() const { return _frame_slots; }
1098 int frame_size_in_words() const; // frame_slots in units of the polymorphic 'words'
1099 int frame_size_in_bytes() const { return _frame_slots << LogBytesPerInt; }
1100 RegMask& FIRST_STACK_mask() { return _FIRST_STACK_mask; }
1101 Arena* indexSet_arena() { return _indexSet_arena; }
1102 void* indexSet_free_block_list() { return _indexSet_free_block_list; }
1103 uint node_bundling_limit() { return _node_bundling_limit; }
1104 Bundle* node_bundling_base() { return _node_bundling_base; }
1105 void set_node_bundling_limit(uint n) { _node_bundling_limit = n; }
1106 void set_node_bundling_base(Bundle* b) { _node_bundling_base = b; }
|
73 class PhaseCCP;
74 class PhaseCCP_DCE;
75 class RootNode;
76 class relocInfo;
77 class Scope;
78 class StartNode;
79 class SafePointNode;
80 class JVMState;
81 class Type;
82 class TypeData;
83 class TypeInt;
84 class TypePtr;
85 class TypeOopPtr;
86 class TypeFunc;
87 class Unique_Node_List;
88 class nmethod;
89 class WarmCallInfo;
90 class Node_Stack;
91 struct Final_Reshape_Counts;
92
93 enum LoopOptsMode {
94 LoopOptsDefault = 0,
95 LoopOptsNone = 1,
96 LoopOptsSkipSplitIf = 2,
97 LoopOptsShenandoahExpand = 3,
98 LoopOptsShenandoahPostExpand = 4,
99 LoopOptsVerify = 5,
100 LoopOptsZgcLastRound = 6
101 };
102
103 typedef unsigned int node_idx_t;
104 class NodeCloneInfo {
105 private:
106 uint64_t _idx_clone_orig;
107 public:
108
109 void set_idx(node_idx_t idx) {
110 _idx_clone_orig = (_idx_clone_orig & CONST64(0xFFFFFFFF00000000)) | idx;
111 }
112 node_idx_t idx() const { return (node_idx_t)(_idx_clone_orig & 0xFFFFFFFF); }
113
114 void set_gen(int generation) {
115 uint64_t g = (uint64_t)generation << 32;
116 _idx_clone_orig = (_idx_clone_orig & 0xFFFFFFFF) | g;
117 }
118 int gen() const { return (int)(_idx_clone_orig >> 32); }
119
120 void set(uint64_t x) { _idx_clone_orig = x; }
121 void set(node_idx_t x, int g) { set_idx(x); set_gen(g); }
122 uint64_t get() const { return _idx_clone_orig; }
1077
1078 void process_print_inlining();
1079 void dump_print_inlining();
1080
1081 bool over_inlining_cutoff() const {
1082 if (!inlining_incrementally()) {
1083 return unique() > (uint)NodeCountInliningCutoff;
1084 } else {
1085 return live_nodes() > (uint)LiveNodeCountInliningCutoff;
1086 }
1087 }
1088
1089 void inc_number_of_mh_late_inlines() { _number_of_mh_late_inlines++; }
1090 void dec_number_of_mh_late_inlines() { assert(_number_of_mh_late_inlines > 0, "_number_of_mh_late_inlines < 0 !"); _number_of_mh_late_inlines--; }
1091 bool has_mh_late_inlines() const { return _number_of_mh_late_inlines > 0; }
1092
1093 void inline_incrementally_one(PhaseIterGVN& igvn);
1094 void inline_incrementally(PhaseIterGVN& igvn);
1095 void inline_string_calls(bool parse_time);
1096 void inline_boxing_calls(PhaseIterGVN& igvn);
1097 bool optimize_loops(int& loop_opts_cnt, PhaseIterGVN& igvn, LoopOptsMode mode);
1098
1099 // Matching, CFG layout, allocation, code generation
1100 PhaseCFG* cfg() { return _cfg; }
1101 bool select_24_bit_instr() const { return _select_24_bit_instr; }
1102 bool in_24_bit_fp_mode() const { return _in_24_bit_fp_mode; }
1103 bool has_java_calls() const { return _java_calls > 0; }
1104 int java_calls() const { return _java_calls; }
1105 int inner_loops() const { return _inner_loops; }
1106 Matcher* matcher() { return _matcher; }
1107 PhaseRegAlloc* regalloc() { return _regalloc; }
1108 int frame_slots() const { return _frame_slots; }
1109 int frame_size_in_words() const; // frame_slots in units of the polymorphic 'words'
1110 int frame_size_in_bytes() const { return _frame_slots << LogBytesPerInt; }
1111 RegMask& FIRST_STACK_mask() { return _FIRST_STACK_mask; }
1112 Arena* indexSet_arena() { return _indexSet_arena; }
1113 void* indexSet_free_block_list() { return _indexSet_free_block_list; }
1114 uint node_bundling_limit() { return _node_bundling_limit; }
1115 Bundle* node_bundling_base() { return _node_bundling_base; }
1116 void set_node_bundling_limit(uint n) { _node_bundling_limit = n; }
1117 void set_node_bundling_base(Bundle* b) { _node_bundling_base = b; }
|