Skip to content

Refine and inline MethodHandle.linkTo* methods in ValuePropagation - #21674

Merged
jdmpapin merged 1 commit into
eclipse-openj9:masterfrom
nbhuiyan:vp-mh-2
Apr 26, 2025
Merged

Refine and inline MethodHandle.linkTo* methods in ValuePropagation#21674
jdmpapin merged 1 commit into
eclipse-openj9:masterfrom
nbhuiyan:vp-mh-2

Conversation

@nbhuiyan

Copy link
Copy Markdown
Member

When ValuePropagation is able to obtain the known object info of the MemberName child of a linkToSpecial, linkToVirtual and linkToStatic call, it is possible to refine the INL call and avoid a more expensive dispatch mechanism. The refined linkTo* INL call then gets inlined during delayed VP transformations.

This change also adds a new static helper to deal with populating prex arg info.

@nbhuiyan

Copy link
Copy Markdown
Member Author

@jdmpapin requesting review

@jdmpapin
jdmpapin self-requested a review April 25, 2025 13:42
@jdmpapin jdmpapin self-assigned this Apr 25, 2025
@jdmpapin jdmpapin added comp:jit project:MH Used to track Method Handles related work labels Apr 25, 2025

@jdmpapin jdmpapin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good overall. Just a few minor comments

Comment thread runtime/compiler/optimizer/J9ValuePropagation.cpp Outdated
Comment thread runtime/compiler/optimizer/J9ValuePropagation.cpp Outdated
Comment thread runtime/compiler/optimizer/J9ValuePropagation.cpp Outdated
When ValuePropagation is able to obtain the known object info of
the MemberName child of a linkToSpecial, linkToVirtual and
linkToStatic call, it is possible to refine the INL call and avoid
a more expensive dispatch mechanism. The refined linkTo* INL call
then gets inlined during delayed VP transformations.

This change also adds a new helper to deal with populating
prex arg info and adding the CallInfo to the refined INL
call list.

Signed-off-by: Nazim Bhuiyan <nubhuiyan@ibm.com>
@jdmpapin

Copy link
Copy Markdown
Contributor

Jenkins test sanity all jdk21

@jdmpapin
jdmpapin merged commit ffb0ee0 into eclipse-openj9:master Apr 26, 2025
@nbhuiyan
nbhuiyan deleted the vp-mh-2 branch April 28, 2025 18:55
@github-project-automation github-project-automation Bot moved this from In progress to Done in Adopt OpenJDK MethodHandles Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:jit project:MH Used to track Method Handles related work

Projects

Development

Successfully merging this pull request may close these issues.

3 participants