RFR: 8338906: Avoid passing EnumDescs and extra classes to type switch methods that don't use them

Chen Liang liach at openjdk.org
Fri Aug 23 13:09:02 UTC 2024


On Fri, 23 Aug 2024 12:34:17 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> This PR refactors SwitchBootstraps so that extra EnumDescs and classes are only passed into bootstraps when needed. Benchmarking shows that in many cases these are not needed, and avoiding passing them (via binding in the lists via `MethodHandle::insertArguments`) avoids some auxiliary MH combinator generation during bootstrap. 
> 
> Additional cleanups and refactoring further reduce bootstrap overhead and number of classes loaded.

Bytecode generation changes look good. Will wait for another compiler engineer to review.

-------------

Marked as reviewed by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20693#pullrequestreview-2257191470


More information about the core-libs-dev mailing list