-
Notifications
You must be signed in to change notification settings - Fork 729
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
Remove node refCount decrement in DAA evaluators #16287
Conversation
@r30shah My personal build (zlinux and zOS) passed without failures. However, I don't think we run systemstest in those builds. So, going to run it locally to verify functional correctness of these changes. |
@VermaSh When you launch a personal build on internal jenkins, for test target, add following two to cover the system tests. Also, would it be possible to have a unit test for this? I think the failing tree trace where we see null address node and suspect it is
Though I am still scratching my head around how we could end with this node? |
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.
Looks good to me, @VermaSh Can you check and verify the code path that is taken to generate memory reference and VSII instruction does handle pdload
?
Both Also, we do take care of TODOs:
[1] https://github.com/eclipse/omr/blob/26e52210d25d5b3cd84b1573d4060ef7b663303e/compiler/z/codegen/OMRMemoryReference.cpp#L527 "Populate memory reference"
pdloadVectorEvaluatorHelper(...) "[5] https://github.com/eclipse/omr/blob/26e52210d25d5b3cd84b1573d4060ef7b663303e/compiler/z/codegen/OMRMemoryReference.cpp#L470 "Memory Reference canUseRX path"[6] https://github.com/eclipse/omr/blob/26e52210d25d5b3cd84b1573d4060ef7b663303e/compiler/z/codegen/OMRMemoryReference.cpp#L692 "Memory Reference canUseIndexReg path"[7] https://github.ibm.com/runtimes/openj9-jit-z/issues/737 "Internal issue tracking this" |
77a55e2
to
e2dd661
Compare
Launched a personal build to verify the changes |
6b0f3b9
to
f5e9398
Compare
|
@VermaSh Is this ready for review? |
@r30shah Yup, this is ready for review. There were some failures in my personal build but none of them were related to DAA. The failures were a mix of |
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.
Change looks good to me. Just minor change request to have original comment back.
// register by emitting an LA instruction. If there's a need for large displacement adjustment, | ||
// LAY will be emitted instead. | ||
TR::MemoryReference * targetMR = TR::MemoryReference::create(cg, node);; | ||
// No need to evaluate the address node (first child) of the pdstorei. |
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 originally the second comment was meant to be used for generateVSIInstruction
, it does not meant to say that it will evaluate the address node. As comment says, the VSI instruction generation will separate out the index register from the memory reference. Your current comment enhances what we put in first place, but we should also keep the second comment (May be before generate*).
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 call to create memory reference in those 3 evaluators goes through [1] which doesn't create an index register. Index register doesn't get generated on the path to separateIndexRegister(...)
either so that's why the comment about generateVSIInstruction
didn't feel relevant here.
[1] https://github.com/eclipse/omr/blob/26e52210d25d5b3cd84b1573d4060ef7b663303e/compiler/z/codegen/OMRMemoryReference.cpp#L470 "Memory Reference canUseRX path"
[2] https://github.com/eclipse/omr/blob/310f0efc871923145d85dd1f450b6a08dd11ef35/compiler/z/codegen/OMRMemoryReference.cpp#L2265 "separateIndexRegister(...)"
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.
generateVSIInstruction
calls to enforceSSFormatLimits
on the memory reference, which takes care of translating memory reference that needs all three index register
, base register
and displacement
to the SS format memory reference generating necessary LA
or LAY
instruction.
The call to create memory reference in those 3 evaluators goes through [1] which doesn't create an index register.
I do not think that is true. It is common constructor that is uses to generate memory reference for all instruction. If you take a look at the code that would be executed for indirect load or store [2], you will see that it first tries to generate tryBaseIndexDispl
for the memory reference which would allocate base register, index register and set displacement value for the memory reference.
[1]. https://github.com/eclipse/omr/blob/310f0efc871923145d85dd1f450b6a08dd11ef35/compiler/z/codegen/OMRMemoryReference.cpp#L2054-L2067
[2]. https://github.com/eclipse/omr/blob/310f0efc871923145d85dd1f450b6a08dd11ef35/compiler/z/codegen/OMRMemoryReference.cpp#L1610
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.
ah true true, you are right. I'll update the PR
f5e9398
to
ee8f73e
Compare
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.
No need to decrement reference count of address node in `pdloadVectorEvaluatorHelper`, `pdstoreVectorEvaluatorHelper` and `zdstoreiVectorEvaluatorHelper` evaluators because that happens in `MemoryReference(TR::Node * rootLoadOrStore...)` on `rootLoadOrStore->getOpCode().isIndirect()` path. Comments in those evaluators have also been updated to reflect this. Signed-off-by: Shubham Verma <shubhamv.sv@gmail.com>
ee8f73e
to
5ed7754
Compare
@r30shah Yup both |
jenkins test sanity zlinux jdk8,jdk11,jdk17 |
jenkins test sanity zlinux jdk8 |
No need to decrement reference count of address node in
pdloadVectorEvaluatorHelper
,pdstoreVectorEvaluatorHelper
andzdstoreiVectorEvaluatorHelper
evaluators because that happens inMemoryReference(TR::Node * rootLoadOrStore...)
onrootLoadOrStore->getOpCode().isIndirect()
path.Comments in those evaluators have also been updated to reflect this.
Signed-off-by: Shubham Verma shubhamv.sv@gmail.com