Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse bytecode only once when building a native image #4923

Closed
christianwimmer opened this issue Sep 11, 2022 · 0 comments
Closed

Parse bytecode only once when building a native image #4923

christianwimmer opened this issue Sep 11, 2022 · 0 comments
Assignees
Labels

Comments

@christianwimmer
Copy link

TL;DR

Historically, the native image generator parsed the bytecode of each method (at least) twice: once for static analysis, and then again for AOT compilation. This limits the amount of optimizations that can be performed before the static analysis runs. Bytecode should be parsed only once before static analysis.

Goals

  • Enable the option -H:+ParseOnce in all configurations, and then remove the option completely.
  • Enable optimizations that depend on "parse once", like method inlining before static analysis, also for images contain Truffle languages.

Details

Parsing the bytecode only once is already available and the default for most native images: only when the native image uses JIT compilation and deotimization, i.e., only when a Truffle language is included in the image, bytecode is still parsed multiple times. Fixing this requires a significant re-work of how the image generator handles JIT compilation and deoptimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Released
Development

No branches or pull requests

3 participants