Skip to content

8309332: RISC-V: Improve PrintOptoAssembly output of vector nodes#14279

Closed
zifeihan wants to merge 4 commits intoopenjdk:masterfrom
zifeihan:JDK-8309332
Closed

8309332: RISC-V: Improve PrintOptoAssembly output of vector nodes#14279
zifeihan wants to merge 4 commits intoopenjdk:masterfrom
zifeihan:JDK-8309332

Conversation

@zifeihan
Copy link
Member

@zifeihan zifeihan commented Jun 2, 2023

Hi, Currently in the vector node implementation, some of the instruction formats are part of the rvv assembly instructions, for which the assembly instructions are also incomplete, such as the missing vsetvli assembly instruction(vsetvli is used to set the element width, number, etc), This makes the compiler assembly output by -XX:+PrintOptoAssembly difficult to understand. And if every assembly instruction is reflected, it will be redundant and increase the maintenance work in the future. And referring to other CPUs, such as the ARM64, it is straightforward to use the instruct function name to simplify [1].

While this won't affect release build, we should fix this for debug build. We can use the -XX:+PrintOptoAssembly parameter to print the compiler assembly output by -XX:+PrintOptoAssembly and view the assembly logic in conjunction with the source code of the specific vector node.

[1]

instruct reduce_addI_sve(iRegINoSp dst, iRegIorL2I isrc, vReg vsrc, vRegD tmp) %{
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n->in(2))));
match(Set dst (AddReductionVI isrc vsrc));
effect(TEMP_DEF dst, TEMP tmp);
format %{ "reduce_addI_sve $dst, $isrc, $vsrc\t# KILL $tmp" %}

Testing:

qemu with UseRVV:

  • Tier1 tests (release)
  • test/jdk/jdk/incubator/vector (fastdebug)
  • test/jdk/jdk/incubator/vector/Int256VectorTests.java (fastdebug with -XX:+PrintOptoAssembly)

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-8309332: RISC-V: Improve PrintOptoAssembly output of vector nodes

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14279

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 2, 2023

👋 Welcome back gcao! 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 Jun 2, 2023
@openjdk
Copy link

openjdk bot commented Jun 2, 2023

@zifeihan 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 Jun 2, 2023
@mlbridge
Copy link

mlbridge bot commented Jun 2, 2023

Webrevs

@openjdk
Copy link

openjdk bot commented Jun 3, 2023

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

8309332: RISC-V: Improve PrintOptoAssembly output of vector nodes

Reviewed-by: yzhu, fyang

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

  • ecb1753: 8309334: ProcessTools.main() does not properly set thread names when using the virtual thread wrapper
  • ac1597b: 8309409: Update HttpInputStreamTest and BodyProcessorInputStreamTest to use hg.openjdk.org
  • fdb5893: 8309391: Remove non-failing tests from test/jdk/ProblemList-Virtual.txt
  • 6edd786: 8309265: Serial: Remove the code related to GC overheap limit

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.

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 (@RealFYang) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 3, 2023
@zifeihan
Copy link
Member Author

zifeihan commented Jun 5, 2023

@RealFYang @yhzhu20 Thanks for the review.
/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jun 5, 2023
@openjdk
Copy link

openjdk bot commented Jun 5, 2023

@zifeihan
Your change (at version 94a2a21) is now ready to be sponsored by a Committer.

@RealFYang
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 5, 2023

Going to push as commit 08c91c2.
Since your change was applied there have been 4 commits pushed to the master branch:

  • ecb1753: 8309334: ProcessTools.main() does not properly set thread names when using the virtual thread wrapper
  • ac1597b: 8309409: Update HttpInputStreamTest and BodyProcessorInputStreamTest to use hg.openjdk.org
  • fdb5893: 8309391: Remove non-failing tests from test/jdk/ProblemList-Virtual.txt
  • 6edd786: 8309265: Serial: Remove the code related to GC overheap limit

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 5, 2023

@RealFYang @zifeihan Pushed as commit 08c91c2.

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

@zifeihan zifeihan deleted the JDK-8309332 branch July 19, 2023 14:56
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