8247697: Remove delayed_forbidden dead code in C2

The delayed_forbidden parameter to Compile::call_generator is never used.

Reviewed-by: kvn, vlivanov, thartmann
This commit is contained in:
Ludovic Henry 2020-06-19 08:06:08 +02:00 committed by Tobias Hartmann
parent a16994ff7b
commit 651c20d4ef
4 changed files with 7 additions and 10 deletions

View file

@ -821,13 +821,13 @@ JVMState* PredictedCallGenerator::generate(JVMState* jvms) {
} }
CallGenerator* CallGenerator::for_method_handle_call(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool delayed_forbidden) { CallGenerator* CallGenerator::for_method_handle_call(JVMState* jvms, ciMethod* caller, ciMethod* callee) {
assert(callee->is_method_handle_intrinsic(), "for_method_handle_call mismatch"); assert(callee->is_method_handle_intrinsic(), "for_method_handle_call mismatch");
bool input_not_const; bool input_not_const;
CallGenerator* cg = CallGenerator::for_method_handle_inline(jvms, caller, callee, input_not_const); CallGenerator* cg = CallGenerator::for_method_handle_inline(jvms, caller, callee, input_not_const);
Compile* C = Compile::current(); Compile* C = Compile::current();
if (cg != NULL) { if (cg != NULL) {
if (!delayed_forbidden && AlwaysIncrementalInline) { if (AlwaysIncrementalInline) {
return CallGenerator::for_late_inline(callee, cg); return CallGenerator::for_late_inline(callee, cg);
} else { } else {
return cg; return cg;

View file

@ -124,7 +124,7 @@ class CallGenerator : public ResourceObj {
static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false); // static, special static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false); // static, special
static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index); // virtual, interface static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index); // virtual, interface
static CallGenerator* for_method_handle_call( JVMState* jvms, ciMethod* caller, ciMethod* callee, bool delayed_forbidden); static CallGenerator* for_method_handle_call( JVMState* jvms, ciMethod* caller, ciMethod* callee);
static CallGenerator* for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool& input_not_const); static CallGenerator* for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee, bool& input_not_const);
// How to generate a replace a direct call with an inline version // How to generate a replace a direct call with an inline version

View file

@ -864,7 +864,7 @@ class Compile : public Phase {
// The profile factor is a discount to apply to this site's interp. profile. // The profile factor is a discount to apply to this site's interp. profile.
CallGenerator* call_generator(ciMethod* call_method, int vtable_index, bool call_does_dispatch, CallGenerator* call_generator(ciMethod* call_method, int vtable_index, bool call_does_dispatch,
JVMState* jvms, bool allow_inline, float profile_factor, ciKlass* speculative_receiver_type = NULL, JVMState* jvms, bool allow_inline, float profile_factor, ciKlass* speculative_receiver_type = NULL,
bool allow_intrinsics = true, bool delayed_forbidden = false); bool allow_intrinsics = true);
bool should_delay_inlining(ciMethod* call_method, JVMState* jvms) { bool should_delay_inlining(ciMethod* call_method, JVMState* jvms) {
return should_delay_string_inlining(call_method, jvms) || return should_delay_string_inlining(call_method, jvms) ||
should_delay_boxing_inlining(call_method, jvms); should_delay_boxing_inlining(call_method, jvms);

View file

@ -65,7 +65,7 @@ void trace_type_profile(Compile* C, ciMethod *method, int depth, int bci, ciMeth
CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool call_does_dispatch, CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool call_does_dispatch,
JVMState* jvms, bool allow_inline, JVMState* jvms, bool allow_inline,
float prof_factor, ciKlass* speculative_receiver_type, float prof_factor, ciKlass* speculative_receiver_type,
bool allow_intrinsics, bool delayed_forbidden) { bool allow_intrinsics) {
ciMethod* caller = jvms->method(); ciMethod* caller = jvms->method();
int bci = jvms->bci(); int bci = jvms->bci();
Bytecodes::Code bytecode = caller->java_code_at_bci(bci); Bytecodes::Code bytecode = caller->java_code_at_bci(bci);
@ -145,8 +145,7 @@ CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool
// MethodHandle.invoke* are native methods which obviously don't // MethodHandle.invoke* are native methods which obviously don't
// have bytecodes and so normal inlining fails. // have bytecodes and so normal inlining fails.
if (callee->is_method_handle_intrinsic()) { if (callee->is_method_handle_intrinsic()) {
CallGenerator* cg = CallGenerator::for_method_handle_call(jvms, caller, callee, delayed_forbidden); CallGenerator* cg = CallGenerator::for_method_handle_call(jvms, caller, callee);
assert(cg == NULL || !delayed_forbidden || !cg->is_late_inline() || cg->is_mh_late_inline(), "unexpected CallGenerator");
return cg; return cg;
} }
@ -182,12 +181,10 @@ CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool
// opportunity to perform some high level optimizations // opportunity to perform some high level optimizations
// first. // first.
if (should_delay_string_inlining(callee, jvms)) { if (should_delay_string_inlining(callee, jvms)) {
assert(!delayed_forbidden, "strange");
return CallGenerator::for_string_late_inline(callee, cg); return CallGenerator::for_string_late_inline(callee, cg);
} else if (should_delay_boxing_inlining(callee, jvms)) { } else if (should_delay_boxing_inlining(callee, jvms)) {
assert(!delayed_forbidden, "strange");
return CallGenerator::for_boxing_late_inline(callee, cg); return CallGenerator::for_boxing_late_inline(callee, cg);
} else if ((should_delay || AlwaysIncrementalInline) && !delayed_forbidden) { } else if ((should_delay || AlwaysIncrementalInline)) {
return CallGenerator::for_late_inline(callee, cg); return CallGenerator::for_late_inline(callee, cg);
} }
} }