Skip to content
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

Allow Value Propagation to remove TR::new that creates a value type instance #7239

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hzongaro
Copy link
Contributor

@hzongaro hzongaro commented Jan 22, 2024

Previously, value type instances created with the jitNewObject helper in a TR::new operation would result in an InstantiationError. That prevented Value Propagation from removing a TR::new operation that was known to create an instance of a value type. This change prepares for the possibility that a TR::new with a jitNewObject helper could be used to create an instance of a value type, which means the operation need not be kept just to allow for an InstantiationError to be thrown.

Whether a TR::new with jitNewObject can be used to create a value type instance is indicated by the method ObjectModel method OMR::ObjectModel::areValueTypeInstancesCreatedWithBCNew. The default implementation returns false, but downstream uses might override that implementation.

This pull request will require a co-ordinated merge with OpenJ9 pull request eclipse-openj9/openj9#18790

Previously, value type instances created with the jitNewObject helper in
a TR::new operation would result in an InstantiationError.  That
prevented Value Propagation from removing a TR::new operation that was
known to create an instance of a value type.  This change prepares for
the possibility that a TR::new with a jitNewObject helper could be used
to create an instance of a value type, which means the operation need
not be kept just to allow for an InstantiationError to be thrown.

Whether a TR::new with jitNewObject can be used to create a value type
instance is indicated by the method ObjectModel method
OMR::ObjectModel::areValueTypeInstancesCreatedWithBCNew.  The default
implementation returns false, but downstream uses might override that
implementation.
@hzongaro
Copy link
Contributor Author

I will leave this pull request in draft state for now, as the corresponding pull request in downstream project OpenJ9 depends upon pull request eclipse-openj9/openj9#18558.

@hzongaro
Copy link
Contributor Author

@a7ehuo - FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant