RFR: 8309332: RISC-V: Improve PrintOptoAssembly output of vector nodes [v3]

Fei Yang fyang at openjdk.org
Sat Jun 3 02:52:07 UTC 2023


On Sat, 3 Jun 2023 02:40:03 GMT, Gui Cao <gcao at openjdk.org> wrote:

>> 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] https://github.com/openjdk/jdk/blob/4460429d7a50b9a7a99058ef4e5ae36fb30b956f/src/hotspot/cpu/aarch64/aarch64_vector.ad#L2842-L2846
>> 
>> ### Testing:
>> qemu with UseRVV:
>> 
>> - [ ] Tier1 tests (release)
>> - [x] test/jdk/jdk/incubator/vector (fastdebug)
>> - [x] test/jdk/jdk/incubator/vector/Int256VectorTests.java (fastdebug with -XX:+PrintOptoAssembly)
>
> Gui Cao has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - Update dst_src1/dst_src in format
>  - Merge branch 'master' into JDK-8309332
>  - Update vneg/vfneg instruct format
>  - RISC-V: Improve PrintOptoAssembly output of vector nodes

Marked as reviewed by fyang (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/14279#pullrequestreview-1458806375


More information about the hotspot-compiler-dev mailing list