-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
Milestone
Description
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.