comparison src/share/vm/opto/callGenerator.hpp @ 7473:d092d1b31229

8005071: Incremental inlining for JSR 292 Summary: post parse inlining driven by number of live nodes. Reviewed-by: twisti, kvn, jrose
author roland
date Sun, 23 Dec 2012 17:08:22 +0100
parents ad5dd04754ee
children 989155e2d07a 6f3fd5150b67
comparison
equal deleted inserted replaced
7445:cd962e15c08e 7473:d092d1b31229
66 // is_trap: Does not return to the caller. (E.g., uncommon trap.) 66 // is_trap: Does not return to the caller. (E.g., uncommon trap.)
67 virtual bool is_trap() const { return false; } 67 virtual bool is_trap() const { return false; }
68 68
69 // is_late_inline: supports conversion of call into an inline 69 // is_late_inline: supports conversion of call into an inline
70 virtual bool is_late_inline() const { return false; } 70 virtual bool is_late_inline() const { return false; }
71 // same but for method handle calls
72 virtual bool is_mh_late_inline() const { return false; }
73
74 // for method handle calls: have we tried inlinining the call already?
75 virtual bool already_attempted() const { ShouldNotReachHere(); return false; }
76
71 // Replace the call with an inline version of the code 77 // Replace the call with an inline version of the code
72 virtual void do_late_inline() { ShouldNotReachHere(); } 78 virtual void do_late_inline() { ShouldNotReachHere(); }
73 79
74 virtual CallStaticJavaNode* call_node() const { ShouldNotReachHere(); return NULL; } 80 virtual CallStaticJavaNode* call_node() const { ShouldNotReachHere(); return NULL; }
75 81
110 // How to generate vanilla out-of-line call sites: 116 // How to generate vanilla out-of-line call sites:
111 static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false); // static, special 117 static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false); // static, special
112 static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index); // virtual, interface 118 static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index); // virtual, interface
113 static CallGenerator* for_dynamic_call(ciMethod* m); // invokedynamic 119 static CallGenerator* for_dynamic_call(ciMethod* m); // invokedynamic
114 120
115 static CallGenerator* for_method_handle_call( JVMState* jvms, ciMethod* caller, ciMethod* callee); 121 static CallGenerator* for_method_handle_call( JVMState* jvms, ciMethod* caller, ciMethod* callee, bool delayed_forbidden);
116 static CallGenerator* for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee); 122 static CallGenerator* for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool& input_not_const);
117 123
118 // How to generate a replace a direct call with an inline version 124 // How to generate a replace a direct call with an inline version
119 static CallGenerator* for_late_inline(ciMethod* m, CallGenerator* inline_cg); 125 static CallGenerator* for_late_inline(ciMethod* m, CallGenerator* inline_cg);
126 static CallGenerator* for_mh_late_inline(ciMethod* caller, ciMethod* callee, bool input_not_const);
127 static CallGenerator* for_string_late_inline(ciMethod* m, CallGenerator* inline_cg);
120 128
121 // How to make a call but defer the decision whether to inline or not. 129 // How to make a call but defer the decision whether to inline or not.
122 static CallGenerator* for_warm_call(WarmCallInfo* ci, 130 static CallGenerator* for_warm_call(WarmCallInfo* ci,
123 CallGenerator* if_cold, 131 CallGenerator* if_cold,
124 CallGenerator* if_hot); 132 CallGenerator* if_hot);
144 static CallGenerator* for_intrinsic(ciMethod* m); 152 static CallGenerator* for_intrinsic(ciMethod* m);
145 static void register_intrinsic(ciMethod* m, CallGenerator* cg); 153 static void register_intrinsic(ciMethod* m, CallGenerator* cg);
146 static CallGenerator* for_predicted_intrinsic(CallGenerator* intrinsic, 154 static CallGenerator* for_predicted_intrinsic(CallGenerator* intrinsic,
147 CallGenerator* cg); 155 CallGenerator* cg);
148 virtual Node* generate_predicate(JVMState* jvms) { return NULL; }; 156 virtual Node* generate_predicate(JVMState* jvms) { return NULL; };
157
158 virtual void print_inlining_late(const char* msg) { ShouldNotReachHere(); }
149 159
150 static void print_inlining(Compile* C, ciMethod* callee, int inline_level, int bci, const char* msg) { 160 static void print_inlining(Compile* C, ciMethod* callee, int inline_level, int bci, const char* msg) {
151 if (PrintInlining) 161 if (PrintInlining)
152 C->print_inlining(callee, inline_level, bci, msg); 162 C->print_inlining(callee, inline_level, bci, msg);
153 } 163 }