-
Notifications
You must be signed in to change notification settings - Fork 397
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
VPKnownObject Constraints for JITServer #7565
VPKnownObject Constraints for JITServer #7565
Conversation
compiler/optimizer/VPConstraint.cpp
Outdated
vp->addConstraint(constraint, hash); | ||
} | ||
} | ||
TR_J9VMBase::ObjectClassInfo ci = vp->comp()->fej9()->getObjectClassInfoFromKnownObjectIndex |
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.
Where is TR_J9VMBase::ObjectClassInfo defined?
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.
Note that getObjectClassInfoFromKnownObjectIndex()
already exists, but does not do exactly what the code it replaces does.
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.
The ObjectClassInfo
is defined under class TR_J9VMBase
in VMJ9.h, I see a few other structs defined like that as well.
9286f68
to
c9499b1
Compare
compiler/optimizer/VPConstraint.cpp
Outdated
} | ||
} | ||
TR_OpaqueClassBlock *clazz = vp->comp()->fej9()->getObjectClassFromKnownObjectIndex | ||
(vp->comp(), index, isJavaLangClass); |
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.
This implementation eliminates the assert that made sure that, whenever the parameter isJavaLangClass
is true, clazz is the class the java/lang/class
This PR depends on eclipse-openj9/openj9#20695 |
1a9e704
to
a855f6d
Compare
compiler/optimizer/VPConstraint.cpp
Outdated
bool matchJavaLangClass; | ||
TR_OpaqueClassBlock *clazz = vp->comp()->fej9()->getObjectClassFromKnownObjectIndex | ||
(vp->comp(), index, &matchJavaLangClass); | ||
TR_ASSERT(matchJavaLangClass == isJavaLangClass, |
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 would prefer this assert to be made FATAL.
Also, I propose the following message:
"Use createForJavaLangClass if and only if the object is an instance of java/lang/Class;
compiler/optimizer/VPConstraint.cpp
Outdated
@@ -1385,7 +1375,7 @@ TR::VPConstString *TR::VPConstString::create(OMR::ValuePropagation *vp, TR::Symb | |||
TR::VMAccessCriticalSection vpConstStringCriticalSection(vp->comp(), | |||
TR::VMAccessCriticalSection::tryToAcquireVMAccess); | |||
|
|||
if (vpConstStringCriticalSection.hasVMAccess()) | |||
if (vpConstStringCriticalSection.hasVMAccess() && 0) |
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 guess these "&& 0" are hacks that will be removed
if (vp->comp()->isOutOfProcessCompilation()) | ||
return false; | ||
|
||
TR::KnownObjectTable *knot = vp->comp()->getKnownObjectTable(); |
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.
We should keep this test that makes sure knot exists
e764ea2
to
55816c2
Compare
Ensure VPKnownObject works in server mode with appropriate queries. Signed-off-by: Luke Li <[email protected]>
55816c2
to
e9ba29c
Compare
I think we can make this PR ready for review by the OMR committers. |
jenkins build all |
Jenkins build all |
@mpirvu may I ask you to formally approve when you are good with these changes ? Since you were having a conversation with Luke. |
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.
LGTM
Ensure VPKnownObject works in server mode with appropriate queries.