JDK-8280467 : C1: Perform CHA when inlining through method handle linkers
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 19
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-01-21
  • Updated: 2022-01-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
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);
          }