8386861: [lworld] emit_opSubstitutabilityCheck speedup#2628
8386861: [lworld] emit_opSubstitutabilityCheck speedup#2628PeyaPeyaPeyang wants to merge 4 commits into
Conversation
|
👋 Welcome back dyama! A progress list of the required criteria for merging this PR into |
|
@PeyaPeyaPeyang 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 84 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. 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 (@chhagedorn) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
|
|
||
| __ cmpptr(left, right); | ||
| __ jcc(Assembler::equal, L_oops_equal); | ||
| if (left == right) { |
There was a problem hiding this comment.
Thanks for picking this up. I have a general question about this patch: Couldn't we already check whether left.result() and right.result() refer to the same LIR operand earlier in LIRGenerator::substitutability_check_common() before creating LIR_OpSubstitutabilityCheck?
valhalla/src/hotspot/share/c1/c1_LIRGenerator.cpp
Lines 3379 to 3381 in a918cc9
|
Why not ? |
|
Thanks @chhagedorn and @TheRealMDoerr for pointing that out. You are absolutely right. |
| if (left.result() == right.result()) { | ||
| __ move(equal_result, result); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Good idea. Are the platform specific parts still needed after this?
There was a problem hiding this comment.
You are right, they are not needed any more after this, I think.
Thanks for pointing out..!
This is not a large change, so I'll clean up the
platform-specific codes with this PR as well.
TheRealMDoerr
left a comment
There was a problem hiding this comment.
LGTM. Thanks for improving it!
|
/integrate |
|
@PeyaPeyaPeyang This pull request has not yet been marked as ready for integration. |
|
Hello @chhagedorn I fear I was rather too hasty and nearly integrated this. Many thanks! |
chhagedorn
left a comment
There was a problem hiding this comment.
Thanks for the update! That looks good to me, too. Let me give this a spin in our testing.
Just to let you know: For the mainline pre-integration testing, we are temporarily holding off on further integrations. We still need to decide whether follow-up changes should go into a separate Valhalla branch or be integrated into mainline afterward. We will get back to you later this week with further guidance.
|
Thanks for the review and the heads-up! |
|
For non-blocking issues like this, we should hold off from integration and then re-base the PR to mainline after Valhalla integration. Btw, testing looked good but we should rerun testing once we are in mainline. |
When
left == rightis known at code generation time, the operands are necessarily the same oop, so we can jump directly toL_oops_equal.This patch changes both x86 and aarch65 to do that.
I also considered emitting
equal_resultand returning early in that case.I decided not to do that because
LIR_OpSubstitutabilityCheck::emit_code()still appends the slow-path stub afteremit_opSubstitutabilityCheck()returns.An early return here would skip binding
op->stub()->continuation(), leaving the appended stub with an unbound continuation label.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2628/head:pull/2628$ git checkout pull/2628Update a local copy of the PR:
$ git checkout pull/2628$ git pull https://git.openjdk.org/valhalla.git pull/2628/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2628View PR using the GUI difftool:
$ git pr show -t 2628Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2628.diff
Using Webrev
Link to Webrev Comment