Skip to content

(0.51) Enable peeking ILGen for inlined methods related to java/util/HashMap get/put operations #21309

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

Conversation

nbhuiyan
Copy link
Member

@nbhuiyan nbhuiyan commented Mar 7, 2025

This PR contributes #21157 for 0.51.

nbhuiyan added 4 commits March 7, 2025 15:08
To propagate arg info from callers of HashMap.put, HashMap.get, and
Object.hashCode, generating IL of their callers is necessary when
called from an inlined method. This allows us to propagate prex
arg info from caller and enable compile-time folding of
fastIdentityHashCode calls.

Signed-off-by: Nazim Bhuiyan <[email protected]>
For some call targets and their sub call graphs, it may be
possible to simplify them into simple operations in certain
situations, such as when known object info is being passed
as arg. In such cases, the node count obtained via
generateNodeEstimate would not truly reflect the number of
nodes that are actually introduced. This commit adds a
mechanism that terminates recursive call target walk during
node count estimation when faced with call graphs that can
be simplified into simple operations.

Signed-off-by: Nazim Bhuiyan <[email protected]>
This routine was only being used for recursively walking call
targets and counting nodes, despite being designed to perform
any "action". It was not going to work for any action other
than generateNodeEstimate as the debugTrace message relied
on calling generateNodeEstimate::getNodeEstimate.

This commit repurposes this function to only be used for node
counting, rather than any "action", and renames the function
accordingly.

Signed-off-by: Nazim Bhuiyan <[email protected]>
@nbhuiyan nbhuiyan requested a review from dsouzai as a code owner March 7, 2025 20:11
@nbhuiyan
Copy link
Member Author

nbhuiyan commented Mar 7, 2025

@vijaysun-omr FYI

@vijaysun-omr vijaysun-omr merged commit 0b1a3eb into eclipse-openj9:v0.51.0-release Mar 7, 2025
2 checks passed
@nbhuiyan nbhuiyan deleted the class-arg-propagation-0.51 branch April 28, 2025 18:59
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.

2 participants