Skip to content

Profiling, profile-guided optimization, and deoptimization #7235

@DemiMarie

Description

@DemiMarie

This is a proposal for profile-guided optimization and deoptimization, much as is performed by the JVM. This will allow all of the following:

  • Devirtualization when (given the currently loaded classes) only one type could be the target of the method invocation.
  • Speculative branch analysis: If profiling data shows that a branch is always/never taken, it is possible to assume that the branch will continue to be always/never taken, and not generate code for the other path, instead generating a bailout.
  • Speculative devirtualization: if a virtual/interface method has only had one callee seen so far, the call site can be replaced with a test and then a direct call.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions