Skip to content

8301033: RISC-V: Handle special cases for MinI/MaxI nodes for Zbb#12176

Closed
RealFYang wants to merge 1 commit intoopenjdk:masterfrom
RealFYang:JDK-8301033
Closed

8301033: RISC-V: Handle special cases for MinI/MaxI nodes for Zbb#12176
RealFYang wants to merge 1 commit intoopenjdk:masterfrom
RealFYang:JDK-8301033

Conversation

@RealFYang
Copy link
Member

@RealFYang RealFYang commented Jan 25, 2023

The code generation for MinI/MaxI nodes for Zbb extension could be improved when one of the source operands is constant 0. We can make use of the dedicated zero register of the architecture for these special cases. This adds two match rules for those cases. The difference in -XX:+PrintOptoAssembly output looks like:

Before:

048 li R7, #0 # int, #@loadConI
04a + max R10, R12, R7 #@maxI_reg_b
04e # pop frame 32

After:

048 max R10, R12, zr #@maxI_reg_zero_b
04c # pop frame 32

Before:

028 li R7, #0 # int, #@loadConI
02a + min R10, R11, R7 #@minI_reg_b
02e # pop frame 32

After:

028 min R10, R11, zr #@minI_reg_zero_b
02c # pop frame 32

Testing:


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-8301033: RISC-V: Handle special cases for MinI/MaxI nodes for Zbb

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12176

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 25, 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 25, 2023
@openjdk
Copy link

openjdk bot commented Jan 25, 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 25, 2023
@mlbridge
Copy link

mlbridge bot commented Jan 25, 2023

Webrevs

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.

Looks good.

@openjdk
Copy link

openjdk bot commented Jan 30, 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:

8301033: RISC-V: Handle special cases for MinI/MaxI nodes for Zbb

Reviewed-by: fjiang, luhenry, 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 84 new commits pushed to the master branch:

  • f50cda7: 8301217: Remove FilteringClosure
  • 08b24ac: 8294066: IGV: Graph changes when deleting a graph in the same group with smaller index
  • 3db558b: 8300915: G1: incomplete SATB because nmethod entry barriers don't get armed
  • cbefe1f: 8301163: jdk/internal/vm/Continuation/Fuzz.java increase COMPILATION_TIMEOUT for Linux ppc64le
  • c2ebd17: 6187113: DefaultListSelectionModel.removeIndexInterval(0, Integer.MAX_VALUE) fails
  • 4bd3f0a: 8301088: oopDesc::print_on should consistently use a trailing newline
  • 64b25ea: 8291569: Consider removing JNI checks for signals SIGPIPE and SIGXFSZ
  • 1ff4646: 8298612: Refactor archiving of java String objects
  • d4e9f5e: 8238170: BeanContextSupport remove and propertyChange can deadlock
  • 6475501: 8300208: Optimize Adler32 stub for AVX-512 targets.
  • ... and 74 more: https://git.openjdk.org/jdk/compare/fbe5ab0066e2766124a7f5db155b9634e1790671...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 Jan 30, 2023
@RealFYang
Copy link
Member Author

Thanks all for the review.
/integrate

@openjdk
Copy link

openjdk bot commented Jan 30, 2023

Going to push as commit 61a5f11.
Since your change was applied there have been 88 commits pushed to the master branch:

  • 82df4a2: 8301148: Serial: Remove ContiguousSpace::reset_saved_mark
  • c672ed1: 8301248: Less side effects in InstanceRefKlass::trace_reference_gc
  • cee4bd3: 8301047: Clean up type unsafe uses of oop from compiler code
  • 7fae3a1: 8301229: Clean up SuspendibleThreadSet::_suspend_all
  • f50cda7: 8301217: Remove FilteringClosure
  • 08b24ac: 8294066: IGV: Graph changes when deleting a graph in the same group with smaller index
  • 3db558b: 8300915: G1: incomplete SATB because nmethod entry barriers don't get armed
  • cbefe1f: 8301163: jdk/internal/vm/Continuation/Fuzz.java increase COMPILATION_TIMEOUT for Linux ppc64le
  • c2ebd17: 6187113: DefaultListSelectionModel.removeIndexInterval(0, Integer.MAX_VALUE) fails
  • 4bd3f0a: 8301088: oopDesc::print_on should consistently use a trailing newline
  • ... and 78 more: https://git.openjdk.org/jdk/compare/fbe5ab0066e2766124a7f5db155b9634e1790671...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 30, 2023

@RealFYang Pushed as commit 61a5f11.

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

@RealFYang RealFYang deleted the JDK-8301033 branch January 31, 2023 01:05
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.

4 participants