-
Notifications
You must be signed in to change notification settings - Fork 729
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
Optimize primitive unboxing method calls #18794
Conversation
Doing it this way will still consume inliner budget if I'm not mistaken (@nbhuiyan, please keep me honest). I wonder if it would be better to recognize and inline these simple methods during ILGen by openj9/runtime/compiler/ilgen/Walker.cpp Line 3519 in b669217
|
Yes, methods under |
5d3d93a
to
a39adc7
Compare
I was able to move this optimization into the ILGen phase during |
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.
I think the changes look good overall. Just one minor issue that trips up some compilers.
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.
Oops! Accidentally approved when I hadn't intended to.
a39adc7
to
aac6a8e
Compare
@hzongaro ready for another pass |
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.
I think the changes look good - just one cosmetic change request. Otherwise approved. Thanks!
aac6a8e
to
9ab9c24
Compare
Jenkins test sanity all jdk8,jdk11,jdk17,jdk21 |
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.
Looks good.
Looks like at least some of the build failures are real. For example, from the JDK 11 PPC64LE build:
|
9ab9c24
to
133548e
Compare
133548e
to
6e2c273
Compare
Internal build #20439 passing after a check was inserted to check that loading a class from a signature did not result in |
6e2c273
to
8ea3390
Compare
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.
I think the changes look correct. Just a couple of minor comments.
8ea3390
to
fe7ab76
Compare
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.
Looks good! Thanks for the changes.
@0xdaryl, if you're satisfied with the changes, I'll run PR testing. |
Jenkins test sanity all jdk8,jdk11,jdk17,jdk21 |
@jmesyou, it looks like there are some test failures for JDK 8, JDK 17 and JDK 21, all on Windows. May I ask you to investigate? The JDK 21 AIX test build failure appears to be infrastructure-related. |
Boxed primitive classes have a method that unbox their value, implemented as simple getter methods. These methods are marked as @IntrinsicCandidates, intended for simplification by the compiler. This commit recognizes the primitive unboxing methods and generates the equivalent optimized IL during IL generation. This is intended to remove load off of analysis during the inlining phase. Signed-off-by: James You <[email protected]>
fe7ab76
to
83fc28c
Compare
I strongly suspect these failures might have been caused by the uncoordinated merges of #18876 and eclipse-omr/omr#7247 that I performed the same day that I kicked off the pull request testing in my comment above. My apologies for not noticing sooner! Jenkins test sanity all jdk8,jdk11,jdk17,jdk21 |
Failure in s390x_linux JDK 17 testing appears to be due to issue #17844. Failure in x86-64_mac JDK 21 testing appears to be infrastructure-related. Restarting. Jenkins test sanity xmac jdk21 |
Boxed primitive classes have a method that unboxes their value, which are implemented as simple getter methods. These methods are marked as @IntrinsicCandidates, intended for simplification by the compiler.
This commit recognizes the primitive unboxing methods and generates simplified IL during IL generation instead of emitting the call where possible.