-
Notifications
You must be signed in to change notification settings - Fork 415
Add missing edge in block splitter #7680
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
Add missing edge in block splitter #7680
Conversation
|
@vijaysun-omr May I ask you to review this change? Thank you! A more detailed description on this block splitter problem can be found in eclipse-openj9/openj9#21030 (comment). @hzongaro fyi |
|
Just so I understand this better, if |
|
Here is what happens inside (1) omr/compiler/optimizer/LocalOpts.cpp Lines 6610 to 6611 in 2799857
(2) omr/compiler/optimizer/LocalOpts.cpp Lines 6630 to 6631 in 2799857
(3) omr/compiler/optimizer/LocalOpts.cpp Lines 6638 to 6640 in 2799857
|
|
Thanks for the detailed explanation, it will come in handy when I review the code later today. My question was less about the mechanics of how the trees were changed step by step, and more about the logical control flow in the program, i.e. if you look at your prior comment, it was unclear what the original position was for block 3 and block 4 with respect to block 1 and block 2 that were shown in the "before block splitter" snippet. While your last comment clarified that block 3 and block 4 were located after block 2 in the trees, is the transformation you are showing only applicable if block 2 did not have any code apart from is functionally equivalent to the "before block splitter" picture shown |
None of the blocks are empty. I showed only BBStart and BBEnd to simplify things.
In this particular case, |
|
Jenkins build all |
|
The only suggestion is to add a comment. So I am starting testing anyway. |
There is a case where before block splitter, the merge block is the original fall-through block of the split block and it is also the split block's branch destination. In this case, there is only one edge from the split block to the merge block. --- Before block splitter --- BBStart <block_1> (splitPred) ificmpeq ------> block_2 BBStart <block_2> (mergeNode) As part of the block splitter transformation, it removes the edge from the split block to its original branch destination. It reverses the split block's branch destination to its original fall-through block. In this case the new branch destination is the same as the original branch destination, but the edge between them is now missing. We need to create the edge if it doesn't exist. --- After block splitter --- BBStart <block_1> (splitPred) ificmpne -----> block_2 // branch reversed BBStart <block_3> (cloneStart) BBStart <block_4> (cloneEnd) BBStart <block_2> (mergeNode) ----------------------------- Fixes: eclipse-openj9/openj9#21030 Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
f30e683 to
6cb52ac
Compare
|
Jenkins build all |
|
Jenkins build amac,riscv |
|
Both failures fail in PR #7679 test too. linux_riscv64 failed with the following error, which also failed in PR #7679 test too. Both PR tests run on: riscv-build1 osx_aarch64 failed with porttest, which also failed in PR #7679 test too. Both PR tests run on mac15-aarch64-1 |
There is a case where before block splitter, the merge block is the original fall-through block of the split block and it is also the split block's branch destination. In this case, there is only one edge from the split block to the merge block.
As part of the block splitter transformation, it removes the edge from the split block to its original branch destination. It reverses the split block's branch destination to its original fall-through block. In this case the new branch destination is the same as the original branch destination, but the edge between them is now missing.
We need to create the edge if it doesn't exist.
Fixes: eclipse-openj9/openj9#21030