-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8330540: Rename the enum type CompileCommand to CompileCommandEnum #18829
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
8330540: Rename the enum type CompileCommand to CompileCommandEnum #18829
Conversation
|
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
|
@iklam This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
| #include "code/scopeDesc.hpp" | ||
| #include "compiler/compileBroker.hpp" | ||
| #include "compiler/compilerEvent.hpp" | ||
| #include "compiler/compilerOracle.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you need it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's needed by this:
jvmciCompilerToVM.cpp:571:21: error: 'CompilerOracle' has not been declared
571 | return !Inline || CompilerOracle::should_not_inline(method) || method->dont_inline();
vnkozlov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good.
|
The char* CompileCommand for the flag seems to be used much less than the enum (I could only find it used once). So if we could rename that variable, that would be a simpler solution. But it looks like that would require some advanced macro tricks in DECLARE_FLAGS to allow customization on a per-flag basis. |
|
Thanks @dean-long and @vnkozlov for the review |
|
Going to push as commit 6d56996.
Your commit was automatically rebased without conflicts. |
CompileCommandis used both as a enum type (compilerOracle.hpp), and a global variable (compiler_globals.hpp).This makes very awkward to the enum type -- we are forced to use
enum CompileCommandin the source code whenever a type is needed:This simple c++ file illustrates the problem:
The fix is to rename the enum type to
CompileCommandEnum.This also makes it possible to forward-declare
CompileCommandEnum(see vmEnum.hpp) without including compilerOracle.hpp. This improves HotSpot build time by reducing the number of .o files that include compilerOracle.hpp from 456 to 16.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18829/head:pull/18829$ git checkout pull/18829Update a local copy of the PR:
$ git checkout pull/18829$ git pull https://git.openjdk.org/jdk.git pull/18829/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18829View PR using the GUI difftool:
$ git pr show -t 18829Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18829.diff
Webrev
Link to Webrev Comment