Skip to content
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

8299847: RISC-V: Improve PrintOptoAssembly output of CMoveI/L nodes #11919

Closed
wants to merge 5 commits into from

Conversation

RealFYang
Copy link
Member

@RealFYang RealFYang commented Jan 10, 2023

Witnessed some incorrect/strange branch condition code in PrintOptoAssembly output on RISC-V which is quite misleading. While this won't affect release build, we should fix this for debug build. This also fixes the pipeline for those nodes and bumps the BRANCH_COST a little bit as I think control transfer instructions should have higher cost than regular integer computational instructions.

With this fix, we have some new PrintOptoAssembly output like following snippet:

   460 202     B41: #  out( B42 ) <- in( B40 )  Freq: 55.6844
   461 202 +   li R7, #0       # int, #@loadConI
   462 204 +   addiw  R28, R9, #1      #@addI_reg_imm
   463 208 +   li R29, #0      # int, #@loadConI
   464 20a +   CMove R28, (R28 lt R29), R28, R7        #@cmovI_cmpI      <=============

Testing: Tier1 tested on HiFive Unmatched board.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8299847: RISC-V: Improve PrintOptoAssembly output of CMoveI/L nodes

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11919/head:pull/11919
$ git checkout pull/11919

Update a local copy of the PR:
$ git checkout pull/11919
$ git pull https://git.openjdk.org/jdk pull/11919/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11919

View PR using the GUI difftool:
$ git pr show -t 11919

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11919.diff

@RealFYang RealFYang changed the title 8299847: RISC-V: Incorrect branch condition code in PrintOptoAssembly… 8299847: RISC-V: Incorrect branch condition code in PrintOptoAssembly output Jan 10, 2023
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 10, 2023

👋 Welcome back fyang! 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 openjdk bot added the rfr Pull request is ready for review label Jan 10, 2023
@openjdk
Copy link

openjdk bot commented Jan 10, 2023

@RealFYang 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 Jan 10, 2023
@mlbridge
Copy link

mlbridge bot commented Jan 10, 2023

Webrevs

@RealFYang RealFYang changed the title 8299847: RISC-V: Incorrect branch condition code in PrintOptoAssembly output 8299847: RISC-V: Improve PrintOptoAssembly output of CMoveI/L nodes Jan 10, 2023
Copy link
Member

@feilongjiang feilongjiang left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

Looks okay, but shouldn't CMove instructions be pipe_class_compare?

@openjdk
Copy link

openjdk bot commented Jan 16, 2023

@RealFYang 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:

8299847: RISC-V: Improve PrintOptoAssembly output of CMoveI/L nodes

Reviewed-by: fjiang, 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 1 new commit pushed to the master branch:

  • 319de6a: 8300124: Remove unnecessary assert in GenCollectedHeap::initialize

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Jan 16, 2023
@RealFYang
Copy link
Member Author

RealFYang commented Jan 16, 2023

Looks okay, but shouldn't CMove instructions be pipe_class_compare?

Yes, I agree that is better since we are doing comare and branch here.
Fixed in the last commit. Thanks for the review.

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

Still good.

@RealFYang
Copy link
Member Author

Thanks all for the review.
/integrate

@openjdk
Copy link

openjdk bot commented Jan 17, 2023

Going to push as commit 859ccd1.
Since your change was applied there have been 6 commits pushed to the master branch:

  • 240830d: 8297092: [macos_aarch64] Add support for SHA feature detection
  • f52f6e6: 8299972: Remove metaprogramming/removeReference.hpp
  • 4c1e66e: 8299971: Remove metaprogramming/conditional.hpp
  • 4073b68: 8298047: Remove all non-significant trailing whitespace from properties files
  • 506c818: 8296401: ConcurrentHashTable::bulk_delete might miss to delete some objects
  • 319de6a: 8300124: Remove unnecessary assert in GenCollectedHeap::initialize

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 17, 2023
@openjdk openjdk bot closed this Jan 17, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 17, 2023
@openjdk
Copy link

openjdk bot commented Jan 17, 2023

@RealFYang Pushed as commit 859ccd1.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@RealFYang RealFYang deleted the JDK-8299847 branch January 23, 2023 04: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 integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants