Integrated: 8312332: C2: Refactor SWPointer out from SuperWord
Pengfei Li
pli at openjdk.org
Fri Sep 15 01:06:08 UTC 2023
On Tue, 25 Jul 2023 08:51:38 GMT, Pengfei Li <pli at openjdk.org> wrote:
> As discussed in 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.
>
> 1) We have created new C2 source files `vectorization.[cpp|hpp]` for shared logics and utilities for C2's auto-vectorization. So far we have moved class `SWPointer` and `VectorElementSizeStats` here from `superword.[cpp|hpp]`.
>
> 2) We have decoupled `SWPointer` from class `SuperWord` and renamed it to `VPointer` as it will be used by vectorizers other than SuperWord. The original class `SWPointer` and its inner class `Tracer` both have a `_slp` field initialized in their constructors. In this patch, we have replaced them by other fields and re-written the constructors for the same functionality. Original `SWPointer::invariant()` calls function `SuperWord::find_pre_loop_end()` for loop invariant checks. To help decoupling, we moved function `find_pre_loop_end()` to class `CountedLoopNode`. As function `SWPointer::Tracer::invariant_1()` is tightly coupled with `SuperWord` but only prints some debug messages, we temporarily removed it in this patch. We will consider adding it back after later refactoring of `SuperWord` so we added a `TODO` at its call site in this patch.
>
> 3) We have a lot of memory phi node checks in loop optimizations. So we added a utility function `is_memory_phi()` in `node.hpp`.
>
> Tested tier1~3 on x86 and AArch64. Also manually verified that option `VectorizeDebug` in compiler directives still works well.
This pull request has now been integrated.
Changeset: 96781ba3
Author: Pengfei Li <pli at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/96781ba33d4717c8df2b9ba4cd5d66858cf5c2d1
Stats: 1973 lines in 7 files changed: 989 ins; 930 del; 54 mod
8312332: C2: Refactor SWPointer out from SuperWord
Reviewed-by: epeter, kvn
-------------
PR: https://git.openjdk.org/jdk/pull/15013
More information about the hotspot-compiler-dev
mailing list