-
Notifications
You must be signed in to change notification settings - Fork 396
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
Disable commoning of dataAddr Pointer in createStoresForVar() #7476
base: master
Are you sure you want to change the base?
Conversation
Addendum to c86da7e Signed-off-by: midronij <[email protected]>
50a739b
to
de2996e
Compare
if (child->isDataAddrPointer()) | ||
{ | ||
arrayLoadNode = TR::Node::createLoad(arrayObjectNode, newArrayRef); | ||
child->setAndIncChild(0, arrayLoadNode); |
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.
you are changing the grand-child array object load to the pinning-array local load, but i didn't see previous code (for non-offheap case) changing the child into the corresponding pinning array local load. is it done somewhere else?
I would like to ask @vijaysun-omr for a review too.
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.
My intent was take a similar approach to what was done in c86da7e:
Lines 3788 to 3800 in fa23d1b
if (self()->isDataAddrPointer()) | |
{ | |
TR::Node *firstChild = self()->getFirstChild(); | |
TR::Node *arrayLoadNode = NULL; | |
TR::SymbolReference *newArrayRef = comp->getSymRefTab()->createTemporary(comp->getMethodSymbol(), TR::Address); | |
TR::Node *newStore = TR::Node::createStore(newArrayRef, firstChild); | |
TR::TreeTop *newStoreTree = TR::TreeTop::create(comp, newStore); | |
insertBefore = origInsertBefore->insertBefore(newStoreTree); | |
arrayLoadNode = TR::Node::createLoad(firstChild, newArrayRef); | |
self()->setAndIncChild(0, arrayLoadNode); | |
firstChild->recursivelyDecReferenceCount(); | |
return insertBefore; | |
} |
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 agree with Julian that we probably don't need to change the child to be a load of the newly created temp (the code after line 3927). It probably doesn't hurt doing so either. If you have time to test without the changes to use the load, that may be worth it to minimize what is being changed.
Use OMR_GC_SPARSE_HEAP_ALLOCATION instead of J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION in setmemoryEvaluator. Signed-off-by: midronij <[email protected]>
@hzongaro for a review |
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 think the change looks fine. Just one suggestion for readability.
Also, may I ask you to update the comment for commit de2996e to provide a little more detail regarding the reason for the change?
arrayObjectNode = child->getFirstChild(); | ||
|
||
newArrayRef = comp->getSymRefTab()->createTemporary(comp->getMethodSymbol(), TR::Address); | ||
TR::Node *newStore = TR::Node::createStore(newArrayRef, arrayObjectNode ? arrayObjectNode : child); |
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 tests whether arrayObjectNode
is non-null in deciding whether to use arrayObjectNode
or child
, but the condition on the if statement below uses child->isDataAddrPointer()
again. It might be easier to read if both used the same condition - I have a slight preference for child->isDataAddrPointer()
to make it more obvious arrayObjectNode
will be operated set or referenced in all three places.
This contribution includes the following changes:
J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION
insetmemoryEvaluator()
withOMR_GC_SPARSE_HEAP_ALLOCATION