-
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -3911,13 +3911,25 @@ OMR::Node::createStoresForVar(TR::SymbolReference * &nodeRef, TR::TreeTop *inser | |||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||
else | ||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||
newArrayRef = comp->getSymRefTab()-> | ||||||||||||||||||||||||||||
createTemporary(comp->getMethodSymbol(), TR::Address); | ||||||||||||||||||||||||||||
TR::Node *arrayObjectNode = NULL; | ||||||||||||||||||||||||||||
TR::Node *arrayLoadNode = NULL; | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
TR::Node *newStore = TR::Node::createStore(newArrayRef, child); | ||||||||||||||||||||||||||||
if (child->isDataAddrPointer()) | ||||||||||||||||||||||||||||
arrayObjectNode = child->getFirstChild(); | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
newArrayRef = comp->getSymRefTab()->createTemporary(comp->getMethodSymbol(), TR::Address); | ||||||||||||||||||||||||||||
TR::Node *newStore = TR::Node::createStore(newArrayRef, arrayObjectNode ? arrayObjectNode : child); | ||||||||||||||||||||||||||||
newStoreTree = TR::TreeTop::create(comp, newStore); | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
newArrayRef->getSymbol()->setPinningArrayPointer(); | ||||||||||||||||||||||||||||
pinningArray = newArrayRef->getSymbol()->castToAutoSymbol(); | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
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 commentThe 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 commentThe 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||||||||||||||||||||||||||
arrayObjectNode->recursivelyDecReferenceCount(); | ||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||
|
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 usearrayObjectNode
orchild
, but the condition on the if statement below useschild->isDataAddrPointer()
again. It might be easier to read if both used the same condition - I have a slight preference forchild->isDataAddrPointer()
to make it more obviousarrayObjectNode
will be operated set or referenced in all three places.