-
Notifications
You must be signed in to change notification settings - Fork 396
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
BenefitInliner phase 2/3 Classes for building the IDT. #5508
Conversation
e0d0df2
to
e421043
Compare
This is the phase#2 out of 3 of the BenefitInliner contribution. This contribution consists of three commits:
Inlining method summary and IDT are the helper classes so I believe they should be reviewed first. |
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'm not sure what is meant by "commit history will be fixed later" in the commit titles, other than possibly that the commit messages will be cleaned up? The structure of the PR as a series of two commits is good
compiler/optimizer/abstractinterpreter/InliningMethodSummary.cpp
Outdated
Show resolved
Hide resolved
compiler/optimizer/abstractinterpreter/InliningMethodSummary.cpp
Outdated
Show resolved
Hide resolved
compiler/optimizer/abstractinterpreter/InliningMethodSummary.hpp
Outdated
Show resolved
Hide resolved
Please make sure to expand the "hidden conversations," i.e. the review comments that GitHub hides by default for some reason |
4f82ec1
to
25d0d0f
Compare
In the future, would you mind commenting after you force push? If there are multiple force pushes in a row without any intervening activity, GitHub loses earlier force push diffs The comment is also an opportunity to describe/clarify what a particular push is doing |
In addition to the review comments just above, a number of my earlier comments have not been addressed, at least not fully:
|
Qasim * Refactor to use StringBuf to print logs. * Also fixed a minor typo Siva * Dynamically cast test contraint to VP contstraint to ensure its a subclass * Added all the assertions required * Add compiler brace style * Removed semi colon Ref: eclipse#5508 (comment) Co-authored-by: Qasim Khawaja <[email protected]> Co-authored-by: Siva C. Nandipati <[email protected]>
|
hey @jdmpapin , I was wondering if you had a chance to look at the most recent changes that we have made to this PR. We would greatly appreciate your feedback so that we can move on to working on Phase 3 (and the final one) of the contribution. Thanks! |
Sorry for the delay! I'll start reviewing this today, though I won't necessarily finish today. You can expect to see my comments in the next few business days |
Thanks @jdmpapin ! |
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 commit series in this PR has gotten to be quite a mess. It has lots of little commits changing this or that based on review feedback, and multiple merges from upstream. Furthermore, the following commits are unrelated to this PR and have been inadvertently included in it as a result of merging from the openj9-omr 0.36 release branch:
My request is that you please clean this up before making any further changes (including in response to my current review comments). I don't think this PR needs to be more than a single commit. Here's how to do so:
- Make sure you're on the
jack-inliner-phase-2
branch, checking it out if necessary. - Check that your local branch is at the same commit as this PR.
git rev-parse HEAD
should show517a7198155903f909e115de3d56756048db5616
. - Run
git reset --hard c766c4155
; This is the most recent commit shared by your PR branch and the upstream master branch. - Run
git checkout 517a71981 -- .
; This updates your working tree and staging area with the exact file contents as they currently exist in this PR. - Create the new (clean) commit:
git commit
; At the end of the message, please list all prior contributors as co-authors usingCo-authored-by
trailer lines. Don't include any blank lines in the message after the co-authors. 68b4570 and 334f9c8 are examples of properly formatted multi-author commits. - Force-push the branch to update the PR and then post a comment. The force-push diff will be empty.
After that, please make any further changes using git commit --amend
followed by a force-push to update the PR. And if there are any conflicts in the future, please refrain from merging from master. Instead, rebase (onto master, not a release branch) and force-push. If you merge, we'll have to go through this process again to get rid of the merge commit(s).
Now, on to the regular review comments.
I thought that we had agreed in discussions with [at]karimhamdanali and [at]dinolii that we would split the summary optimization conditions into positive and negative cases. This PR has been partially updated in a way that prevents the summary from expressing the possibility of folding
instanceof
to false. Is this distinction still coming? And supposing it is, will this PR be updated to make the distinction, or will that be separate follow-up work?According to my colleague's work, they have splited the
VPClassType
andVPClass
into two separate cases and now the summary optimization conditions are separated by the testing for different foldings. I have newly implemented theVPClassType
part by usingTR_FrontEnd::isInstanceOf()
. A explanation has been replied right below the reviewer's comments for that part of code.
There are two related issues that we had discussed that required making additional distinctions. The first was to distinguish "type T
" (possibly null, all that's needed for checkcast
to succeed) from "type T
and non-null" (needed for instanceof
to succeed). And that distinction has indeed now been made in this PR.
However, I was asking about making a distinction between optimizations possible when a constraint is satisfied and those possible when a constraint is not satisfied. So far this PR only has the former. (In its original revision it treated type constraints as meaning both of them at once in a certain way, but I think we agreed that it shouldn't do that.)
So that leaves my question still unanswered:
Is this distinction still coming?
If not, i.e. if you mean to leave that for the OMR project to deal with after this contribution, I think I'm fine with that at this point, but either way I'd like to clarify what's going on explicitly.
compiler/optimizer/abstractinterpreter/InliningMethodSummary.cpp
Outdated
Show resolved
Hide resolved
compiler/optimizer/abstractinterpreter/InliningMethodSummary.cpp
Outdated
Show resolved
Hide resolved
compiler/optimizer/abstractinterpreter/InliningMethodSummary.cpp
Outdated
Show resolved
Hide resolved
0f0a3f3
to
b6856f8
Compare
Hi @jdmpapin, the commit history has been cleaned up now and all commits has been squashed to one commit. For the answer of:
Actually the first contributor of this PR, Cijie Xia, who has written down However, I found some clues about this question from our phase 3 code of OpenJ9 that should call Due to our prior discussion, we decided to test for checkcast folding and instanceOf folding separately. So, for the instanceOf folding test, we will apply optimization for both positive and negative predicate, but for the checkcast folding test, we will only apply optimization for the positive predicate.
In order to handle both positive and negative predicate, I modified test of instanceOf folding to return I hope this can answer your question. : ) |
Hey @jdmpapin I was wondering if you had a chance to review the latest changes that @mingweiarthurli has made to this PR a couple of weeks ago? |
Taking a look now 👀 |
Hi @jdmpapin , I see you are taking a look for this pull request. I just added a table in my last comment to show what optimizations our inliner will do for both the positive and negative cases of checkcast and instanceOf folding. Please refresh the page to let it show up. I hope this will make my comment clearer. |
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.
Thanks for all of the updates - this is shaping up to look pretty good!
We have one more change going around for all of the file header comments: #6996. This one isn't merged yet, but it may very well be merged before this PR. So for the new files, the proper SPDX line is as follows:
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
Sorry to ask for more changes yet again, but could you please update these SPDX lines?
Additionally, the commit message should describe the changes that it makes to the codebase - i.e. what's being contributed - rather than how those changes have been revised based on review feedback. Please rewrite the commit title and (the main part of the) message. (Your Co-authored-by
lines are correct though, so please leave them as-is.)
compiler/optimizer/abstractinterpreter/InliningMethodSummary.cpp
Outdated
Show resolved
Hide resolved
b6856f8
to
13a02cd
Compare
Jenkins build all |
…ry for the BenefitInliner. IDT.cpp, IDTNode.cpp, InliningMethodSummary.cpp This is the phase 2/3 of the BenefitInliner contribution. Co-authored-by: Cijie Xia <[email protected]> Co-authored-by: dino li <[email protected]> Co-authored-by: Qasim Khawaja <[email protected]> Co-authored-by: Siva C. Nandipati <[email protected]> Signed-off-by: Mingwei Li <[email protected]>
13a02cd
to
80c61ca
Compare
Hi @jdmpapin, I have fixed the compilation failure on the ZOS platform. The Jenkins console showed the following message:
This was caused because we didn't set to return any string for the default switch case of For the test failure on the Linux RISCV64 platform, the following message was returned:
It looks like certain test wasn't implemented, and the I have found follwoing lines in
I assume this is a known issue and I will not fix it. Another problem is I cannot apply those Jenkins checks again once I force pushed my changes. Could you please reapply the checks? I will fix any other problems if there would be any. |
Jenkins build all |
Hi @jdmpapin, sorry for the disturbing! I just would like to check if this pull request has been officially accepted, or do we need to make any futher change? Since I see this pull request is still open and is waiting for merging. |
No worries! Sorry for the delay |
Issue: #5488