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

Enable rdbar and wrtbar Evaluators on Power #4068

Merged
merged 1 commit into from
Jun 25, 2019

Conversation

AlenBadel
Copy link
Contributor

This commit enables all rdbar/rdbari & wrtbar/wrtbari Evaluators on Power.

Signed-off-by: Alen Badel [email protected]

@gita-omr
Copy link
Contributor

@0xdaryl could you please review and merge?

@0xdaryl
Copy link
Contributor

0xdaryl commented Jun 22, 2019

Please fix the CI failures.

compiler/p/codegen/OMRTreeEvaluator.cpp Outdated Show resolved Hide resolved
compiler/p/codegen/OMRTreeEvaluator.cpp Outdated Show resolved Hide resolved
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]>
@gita-omr
Copy link
Contributor

@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);
Copy link
Contributor

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...

Copy link
Contributor

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?

Copy link
Contributor

@dchopra001 dchopra001 Jun 25, 2019

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.

Copy link
Contributor

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.

Copy link
Contributor

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)
Copy link
Contributor

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.

@0xdaryl
Copy link
Contributor

0xdaryl commented Jun 25, 2019

@genie-omr build aix,plinux

@0xdaryl 0xdaryl merged commit e1a83a3 into eclipse-omr:master Jun 25, 2019
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.

5 participants