-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8302814: Delete unused CountLoopEnd instruct with CmpX #12648
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
Conversation
👋 Welcome back sunny868! A progress list of the required criteria for merging this PR into |
Webrevs
|
The failure |
Hi, did you run any tests on these changes? I agree with removing CmpP/CmpN/CmpF/CmpD instructs. But for CmpU, I have checked aarch64.ad, and it provides the U version of CountedLoopEnd, I think we should do some investigating into this: jdk/src/hotspot/cpu/aarch64/aarch64.ad Lines 16526 to 16541 in 43c71dd
And I also found jdk/src/hotspot/share/opto/loopnode.hpp Lines 356 to 371 in 43c71dd
Maybe we could keep the Long version? |
|
I'm not sure about that. I just found that CmpU version was defined in
Yes, we should check if CmpU was safe to remove. By the way, looks x86 also provides CmpU version of CountedeLoopEnd: jdk/src/hotspot/cpu/x86/x86_64.ad Lines 13056 to 13069 in 180b94c
|
For bytecodes if_icmpxx(used by java
|
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.
What about jmpLoopEndUCF*
instructions?
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.
Also I think it is not correct to remove CmpU
case. There are IGVN transformations which convert CmpI
to CmpU
:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/subnode.cpp#L1632
May be that is why next test failed in your GHA testing:
compiler/vectorization/runner/LoopRangeStrideTest.java
I am taking back my next comment because I see this test fails in other PRs:
|
Maybe it only for range check. see: Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) |
Thanks @vnkozlov for the reminder, I think |
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 am not convinced about CmpU but I submitted testing for v03 to see results.
/reviewers 2 |
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.
My tier1-4, xcomp and stress testing passed. I can't complain now :)
You need second review.
|
@sunny868 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@vnkozlov) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
src/hotspot/cpu/riscv/riscv.ad
Outdated
@@ -9294,25 +9160,6 @@ instruct cmpL_reg_imm0_branch(cmpOp cmp, iRegL op1, immL0 zero, label lbl) | |||
ins_short_branch(1); | |||
%} | |||
|
|||
instruct cmpL_reg_imm0_loop(cmpOp cmp, iRegL op1, immL0 zero, label lbl) |
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 this instruction should keep too.
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 current count loop iterations is1000(setting by LoopStripMiningIter
), and if it is too large, it will cause the GC pause too long, so I don't think there is any point in implementing the counted loop for Long type. However, I still respect your opinion and keep cmpL loop
in risv.ad.
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.
New changes look good, thanks.
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.
v04 update is good
/integrate |
Thanks @vnkozlov @feilongjiang for review. |
@sunny868 This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@vnkozlov Do you have any comments on this patch and could you please sponsor it for me? |
@sunny868 please merge master and I will retest it. And please ask for sponsorship sooner. I did not see you needed it. |
/integrate |
My testing (tier1-4, xcomp, stress) passed with latest version. |
/sponsor |
Going to push as commit be764a7.
Your commit was automatically rebased without conflicts. |
CountLoopEnd only for T_int, therefore the following instructs in riscv.ad are useless and should be deleted.
CountedLoopEnd cmp (CmpU op1 op2)
CountedLoopEnd cmp (CmpP op1 op2)
CountedLoopEnd cmp (CmpN op1 op2)
CountedLoopEnd cmp (CmpF op1 op2)
CountedLoopEnd cmp (CmpD op1 op2)
and CountedLoopEnd with CmpU on x86*.ad, aarch64.ad ar useless also.
Please help review it.
Thanks.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/12648/head:pull/12648
$ git checkout pull/12648
Update a local copy of the PR:
$ git checkout pull/12648
$ git pull https://git.openjdk.org/jdk.git pull/12648/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12648
View PR using the GUI difftool:
$ git pr show -t 12648
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12648.diff