Skip to content

8252237: C2: Call to compute_separating_interferences has wrong argument order #1533

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

Closed
wants to merge 1 commit into from

Conversation

r-v-raghav
Copy link
Member

@r-v-raghav r-v-raghav commented Dec 1, 2020

# [.../src/hotspot/share/opto/coalesce.hpp] -
112 uint compute_separating_interferences(Node *dst_copy, Node *src_copy, Block *b, uint bindex, RegMask &rm, uint rm_size, uint reg_degree, uint lr1, uint lr2);

# [.../src/hotspot/share/opto/coalesce.cpp] -
..........
538 uint PhaseConservativeCoalesce::compute_separating_interferences(Node *dst_copy, Node *src_copy, Block *b, uint bindex, RegMask &rm, uint reg_degree, uint rm_size, uint lr1, uint lr2 ) {
.................
747 reg_degree = compute_separating_interferences(dst_copy, src_copy, b, bindex, rm, rm_size, reg_degree, lr1, lr2 );

# So fixing the argument order - [.../src/hotspot/share/opto/coalesce.cpp]
-uint PhaseConservativeCoalesce::compute_separating_interferences(Node *dst_copy, Node *src_copy, Block *b, uint bindex, RegMask &rm, uint reg_degree, uint rm_size, uint lr1, uint lr2 ) {
+uint PhaseConservativeCoalesce::compute_separating_interferences(Node *dst_copy, Node *src_copy, Block *b, uint bindex, RegMask &rm, uint rm_size, uint reg_degree, uint lr1, uint lr2 ) {


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8252237: C2: Call to compute_separating_interferences has wrong argument order

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1533/head:pull/1533
$ git checkout pull/1533

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 1, 2020

👋 Welcome back rraghavan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 1, 2020

@r-v-raghav The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Dec 1, 2020
@r-v-raghav r-v-raghav changed the title C2: Call to compute_separating_interferences has wrong argument order 8252237: Call to compute_separating_interferences has wrong argument order Dec 1, 2020
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 1, 2020
@mlbridge
Copy link

mlbridge bot commented Dec 1, 2020

Webrevs

@r-v-raghav r-v-raghav changed the title 8252237: Call to compute_separating_interferences has wrong argument order 8252237: C2: Call to compute_separating_interferences has wrong argument order Dec 1, 2020
@r-v-raghav
Copy link
Member Author

/reviewer credit thartmann, shade

@openjdk
Copy link

openjdk bot commented Dec 1, 2020

@r-v-raghav
Reviewer thartmann successfully credited.

Reviewer shade successfully credited.

@shipilev
Copy link
Member

shipilev commented Dec 1, 2020

This change looks good, but my question is more wide: does it actually break/fixes any compiler bug? I would have thought changing RA would have some impact. In other words, are there test failures on higher tiers?

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but I'm also wondering why that was never an issue and if the fix could now trigger previously hidden problems. We should at least give it a good amount of testing before integration.

@openjdk
Copy link

openjdk bot commented Dec 3, 2020

@r-v-raghav 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:

8252237: C2: Call to compute_separating_interferences has wrong argument order

Reviewed-by: thartmann, kvn, shade

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 113 new commits pushed to the master branch:

  • 6c9482e: 8257561: Some code is not vectorized after 8251925 and 8250607
  • 70517c8: 8257642: CipherByteBufferOverwriteTest copyright issue
  • e836396: 8257436: [aarch64] Regressions in ArrayCopyUnalignedDst.testByte/testChar for 65-78 bytes when UseSIMDForMemoryOps is on
  • b170c83: 8257591: Remove suppression of record preview related warnings in java.lang
  • 66a2e70: 8255845: Memory leak in imageFile.cpp
  • fa58671: 8257020: [JVMCI] enable a JVMCICompiler to specify which GCs it supports
  • 129c377: 8257594: C2 compiled checkcast of non-null object triggers endless deoptimization/recompilation cycle
  • e4497c9: 8256718: Obsolete the long term deprecated and aliased Trace flags
  • 4a267f1: 8244847: Linux/PPC: runtime/CompressedOops/CompressedClassPointers: smallHeapTest fails
  • b44a329: 8256864: [windows] Improve tracing for mapping errors
  • ... and 103 more: https://git.openjdk.java.net/jdk/compare/4e43b28858b0c7c9fb7ad91a506b61aa1d554f86...master

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 3, 2020
@vnkozlov
Copy link
Contributor

vnkozlov commented Dec 3, 2020

Looks good to me but I'm also wondering why that was never an issue and if the fix could now trigger previously hidden problems. We should at least give it a good amount of testing before integration.

compute_separating_interferences() is used only in one place and resulting reg_degree is only used in place to compare with max_juint:
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/coalesce.cpp#L746
Due to this bug the returning value is most likely max_juint and we bailout coalesce of copies. As result we would have more LRG live ranges to work with but Graph still can be processed.
In short RA produce less optimal code.
I agree with @TobiHartmann we should do a lot of tiers testing for this fix because coalescing code after L755 may be not exercised as much as we want due to this bug.

@r-v-raghav
Copy link
Member Author

Thanks for the details @shipilev, @TobiHartmann, @vnkozlov.
I too could not link any other unresolved or 'won't-fix/incomplete' old c2-regalloc bug to this case.
Yes I will initiate more tier testing with the change before integeration.

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 1, 2021

@r-v-raghav 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!

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 29, 2021

@r-v-raghav This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it!

@bridgekeeper bridgekeeper bot closed this Jan 29, 2021
@r-v-raghav r-v-raghav deleted the JDK-8252237 branch February 22, 2021 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org ready Pull request is ready to be integrated rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

4 participants