Skip to content

[GR-64535] Permit GVN of class initialization checks #11111

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

Merged
merged 1 commit into from
May 14, 2025
Merged

Conversation

graalvmbot
Copy link
Collaborator

KlassBeingInitializedCheckNode and EnsureClassInitializedNode can in theory be global value numbered to permit the removal of class initialization checks when there are already dominating class initialization checks for the same type. By default DominatorBasedGlobalValueNumberingPhase doesn't consider fixed nodes that kill memory to be GVN'able since normally the fact that it kills something would mean it not GVN'able. Since class initialization only has a side effect the first time it's executed it safe to GVN them. This PR adds FixedGlobalValueNumberable so that nodes that kill but that are also safe can be explicitly marked as safe. Note that this will only work for the exact matches.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 1, 2025
@graalvmbot graalvmbot closed this May 14, 2025
@graalvmbot graalvmbot merged commit e448722 into master May 14, 2025
13 checks passed
@graalvmbot graalvmbot deleted the tkr-init-gvn branch May 14, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants