-
Notifications
You must be signed in to change notification settings - Fork 738
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
Guarantee functional correctness of rdbar/wrtbar #4009
Conversation
8f6e4bf
to
effc3af
Compare
// 1. In Guarded Storage, we can't not do a guarded load because the object that is loaded may | ||
// not be in the root set, and as a consequence, may get moved. | ||
// 2. For read barriers, the vmhelpers are GC points and therefore the object might be moved | ||
if (TR::Compiler->om.shouldGenerateReadBarriersForFieldLoads() || generateReadBarrier) |
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.
why isn't the first part of this || part of the bool added above? it would seem you would have to repeat this idiom no? Doesn't this warrant a trace statement of some kind to say we disabling because 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.
Cleaned up the bool and condition. Added tracing as well.
effc3af
to
61902f3
Compare
@@ -2302,6 +2302,9 @@ TR_CISCNode * | |||
TR_CISCTransformer::addAllSubNodes(TR_CISCGraph *const graph, TR::Block *const block, TR::TreeTop *const top, | |||
TR::Node *const parent, TR::Node *const node, const int32_t dagId) | |||
{ | |||
//IdiomRecognition doesn't know how to handle rdbar/wrtbar for now | |||
if ((node->getOpCode().isReadBar() || node->getOpCode().isWrtBar()) && comp()->incompleteOptimizerSupportForReadWriteBarriers()) |
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.
can we reverse the order of the && to make this more clear and break onto a new line at the && so it looks more like
&& (node->getOpCode().isReadBar() || node->getOpCode().isWrtBar()))
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.
changed according to the comment. Thanks!
Once the final code formatting issue is sorted I think this will be good to test and merge. |
03bdb7b
to
9485589
Compare
This change guarantee the correctness of rdbar/wrtbar from the following aspects: 1. Consider rdbar/wrtbar as GC points 2. Make optimizations consider shape of rdbar/wrtbar when doing transformations 3. Disable opts not supporting newly added rdbar/wrtbar when seeing the opcodes Signed-off-by: Yi Zhang <yizhang@ca.ibm.com>
Changed the coding format issue and also added code to disable escape analysis. |
Jenkins test sanity xlinux,win,plinux jdk8.jdk11 |
Jenkins test sanity xlinux,win,plinux jdk8,jdk11 |
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.
LGTM
Failure on x86-64 is DDR related and unrelated to this change- merging |
This change guarantees the correctness of rdbar/wrtbar from the following
aspects:
transformations
the opcodes
Signed-off-by: Yi Zhang yizhang@ca.ibm.com