Improve inlining decisions for method handle linker (MethodHandle.linkTo*) call sites.
src/hotspot/share/c1/c1_GraphBuilder.cpp:
bool GraphBuilder::try_method_handle_inline(ciMethod* callee, bool ignore_return) {
...
// We don't do CHA here so only inline static and statically bindable methods.
if (target->is_static() || target->can_be_statically_bound()) {
Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual;
if (try_inline(target, /*holder_known*/ !callee->is_static(), ignore_return, bc)) {
return true;
}
} else {
print_inlining(target, "not static or statically bindable", /*success*/ false);
}