RFR: 8315361: C2: Create a superclass of SuperWord
Fei Gao
fgao at openjdk.org
Wed Oct 25 02:03: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.
-------------
Commit messages:
- 8315361: C2: Create a superclass of SuperWord
Changes: https://git.openjdk.org/jdk/pull/16353/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16353&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8315361
Stats: 593 lines in 5 files changed: 198 ins; 195 del; 200 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