RFR: 8315361: C2: Create a superclass of SuperWord [v2]

Fei Gao fgao at openjdk.org
Wed Oct 25 07:11:55 UTC 2023


> As discussed in [JDK-8308994](https://bugs.openjdk.org/browse/JDK-8308994), we should first do some refactoring work before proceeding with the new post loop vectorization. In this patch, we have done the following refactoring. (Most of changes are just moving the code around without real change on logic.)
> 
> 1) We have created a superclass for shared data structures and utilities for C2's auto-vectorization.
> 
> 2) We have moved data structures for basic loop info and the field _vector_loop_debug to the superclass. We also drop the class member "_visited" and "_post_visited", and instead use local variables, namely allocating them when using them.
> 
> 3) Both two vectorizers traverse and store loop body nodes in RPO (Reverse Post-Order) separately. So we withdraw the logic into a new function `collect_nodes_in_reverse_postorder()`, and move the function and related data structures to the superclass. Before, the code for counting the number of reduction uses is mixed in the RPO logic. Now, we have decoupled the code and put it into SuperWord separately.
> 
> Tested tier1~3 on x86 and AArch64.

Fei Gao has updated the pull request incrementally with one additional commit since the last revision:

  Fixed code style and release build failure

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16353/files
  - new: https://git.openjdk.org/jdk/pull/16353/files/b388240e..dcb87ad5

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16353&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16353&range=00-01

  Stats: 10 lines in 2 files changed: 3 ins; 4 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/16353.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16353/head:pull/16353

PR: https://git.openjdk.org/jdk/pull/16353


More information about the hotspot-compiler-dev mailing list