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

[GR-37411] Fix method inlining and quickbuild mode. #4391

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

graalvmbot
Copy link
Collaborator

Method inlining of AlwaysInline annotated methods is always necessary for correctness. So the option AOTInline just does not make sense. This means the method inlining stage of the CompileQueue must always run. When AOTTrivialInlining is disabled, it just only inlines the AlwaysInline methods.
Also interesting to note is that even with AOTInline disabled, we were still inlining before the static analysis - because that inlining is again necessary for correctness of e.g. Spring applications.

For quick-build mode, disabling trivial method inlining does not make much sense. It takes only 4 seconds for Spring petclinic, then actually reduces compilation time by a few seconds (so overall only a few seconds build time increase) - and avoids all the pathological peak performance problems that can occur without inlining.

The quick-build mode also had a problem that increased the image size (and even image build time of HelloWorld): the enterprise-optimizations before static analysis eliminate String.format and perform method outlining - both actually make images smaller and image build faster. So they must run in quick-build mode too. Removing EconomyHostedConfiguration (so that the proper EnterpriseHostedConfiguration is used) is the simple fix for that problem.

And since I was already changing a lot, I also removed the "hack" that -Ob was treated as optimization level 0 in some places - now OptimizationLevel is an enum and all usages properly distinguish between 0 and b.

@graalvmbot graalvmbot merged commit 594b2e1 into master Mar 16, 2022
@graalvmbot graalvmbot deleted the cwi/GR-37411-inlining branch March 16, 2022 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant