-
Notifications
You must be signed in to change notification settings - Fork 398
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
Enable rdbar and wrtbar Evaluators on Power #4068
Conversation
@0xdaryl could you please review and merge? |
Please fix the CI failures. |
bf191af
to
afb07fe
Compare
This commit enables all rdbar/rdbari & wrtbar/wrtbari Evaluators on Power. Added implementations for: dwrtbar(i)Evaluator fwrtbar(i)Evaluator awrtbar(i)Evaluator Signed-off-by: Alen Badel <[email protected]>
2f388f4
to
6385c23
Compare
@0xdaryl can we merge this? |
cg->evaluate(sideEffectNode); | ||
cg->decReferenceCount(sideEffectNode); | ||
// Delegate the evaluation of the remaining children and the store operation to the storeEvaluator. | ||
return TR::TreeEvaluator::dstoreEvaluator(node, cg); |
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.
There is some specialized code in dstoreEvaluator
that handles double stores of lbits2d
opcodes. If such a scenario occurs, it looks like it tries to change the identity of the node to an lstore
, have it evaluated by the lstoreEvaluator
, and then changes the identity back to a dstore
. However, the input node is actually the two-child write barrier node, and the recreate logic will always create a new Node (based on my understanding of the recreate logic). This is strictly incorrect as a dstore
should only have one child, yet the number of children will be set to two.
I think there already is an existing problem here, but this code is making it worse because you're now creating two dummy nodes instead of one and you're creating them with more children than is allowed on a dstore
node.
I am skeptical that this will cause any functional issues, but it is a leak and the node you're creating aren't strictly valid.
Correct me if I'm wrong on any of this...
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.
Yeah, those extra children still hanging on the nodes and not used worried me too. @cathyzhyi @dchopra001 @AlenBadel do you think that before calling regular store/load Evaluators we should set the number of children appropriately and perhaps even reset the opcode?
On another hand, who would produce such trees and not support them?
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 don't see this lbits2d
type optimization in the Z evaluators for fstore
and dstore
.
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.
Please raise an issue to track the resolution of this problem. It is a pre-existing issue but not one that should be left unresolved.
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.
Opened an issue : #4080
return TR::TreeEvaluator::dstoreEvaluator(node, cg); | ||
} | ||
|
||
TR::Register *OMR::Power::TreeEvaluator::fwrtbarEvaluator(TR::Node *node, TR::CodeGenerator *cg) |
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.
If my comment above is correct, then it also applies here for ibits2f
.
@genie-omr build aix,plinux |
This commit enables all rdbar/rdbari & wrtbar/wrtbari Evaluators on Power.
Signed-off-by: Alen Badel [email protected]