8339401: Optimize ClassFile load and store instructions#20739
8339401: Optimize ClassFile load and store instructions#20739wenshao wants to merge 5 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back wenshao! A progress list of the required criteria for merging this PR into |
|
@wenshao 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 13 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@liach, @cl4es) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
93ce58d to
bfcbe78
Compare
bfcbe78 to
cebed82
Compare
| }; | ||
| case VOID -> throw new IllegalArgumentException("void"); | ||
| case INT, SHORT, BYTE, CHAR, BOOLEAN | ||
| -> iload(slot); |
There was a problem hiding this comment.
Can you do
switch (tk.asLoadable()) {
case INT -> iload(slot);There was a problem hiding this comment.
I'm not sure if that's better, because there's a getField and branch in the implementation of asLoadable
There was a problem hiding this comment.
Logically I think asLoadable is clearer and reduces switch size.
And enum ordinal field is already constant-folded: https://bugs.openjdk.org/browse/JDK-81612454
So it can be elided by JIT if the enum argument is constant.
src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java
Outdated
Show resolved
Hide resolved
Webrevs
|
src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java
Outdated
Show resolved
Hide resolved
|
/integrate |
|
/sponsor |
|
Going to push as commit b94c3de.
Your commit was automatically rebased without conflicts. |
BytecodeHelpers' loadOpcode and storeOpcode are large methods with code size greater than 325, break it into multiple small methods and call them directly in DirectCodeBuilder
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20739/head:pull/20739$ git checkout pull/20739Update a local copy of the PR:
$ git checkout pull/20739$ git pull https://git.openjdk.org/jdk.git pull/20739/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20739View PR using the GUI difftool:
$ git pr show -t 20739Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20739.diff
Webrev
Link to Webrev Comment