JDK-8226508 : Release Note: Class Hierarchy Analysis now handles interfaces
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Withdrawn
  • Submitted: 2019-06-20
  • Updated: 2019-09-05
  • Resolved: 2019-09-05
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.
JDK 13
13Resolved
Description
Class Hierarchy Analysis (CHA) is the optimization technique to figure out whether the class has implementors and how many of them. This allows devirtualizing the method calls even in the absence of profiling information. The most profitable case is the class with no subclasses at all, where JVM can devirtualize the call completely.

CHA is now improved to handle interfaces. This allows JVM to optimize interface calls with just a few implementors, without having to collect profiling data.
Comments
Thanks Vladimir. I'm fine with not including this in the release notes as it seems too technical/detailed for users. Re-opening the task for now.
21-08-2019

> CHA is now improved to handle interfaces. IMO that is a misleading statement. As of now, CHA doesn't handle interfaces most of the time. The RFE implemented a strength-reduction from invokeinterface to invokevirtual when there's a single *direct* implementor. It was there in C1 for ages, but C2 lacked it. (Relevant RFEs are JDK-8036580 and JDK-8036580. Since 8, interfaces are enhanced with default methods and those are not taken into account by CHA yet.) I'll see what can I do to improve the note, but as of now it doesn't look too informative. Is it even worth to be mentioned in release notes?
20-08-2019

Fixed a typo. Otherwise looks good to me.
20-08-2019

Hey [~vlivanov], I am thinking about the release note above. Feel free to edit!
20-06-2019