RFR: 8325589: C2 SuperWord refactoring: create VLoopAnalyzer with Submodules [v3]

Vladimir Kozlov kvn at openjdk.org
Tue Feb 13 21:19:09 UTC 2024


On Tue, 13 Feb 2024 16:26:25 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Subtask of https://github.com/openjdk/jdk/pull/16620
>> 
>> **Goals**:
>> - **modularity**: SuperWord is a nasty large class, and it is difficult to know what impacts what.
>> - **code reuse**: In the future, we may want to reuse some components of SuperWord in other Vectorizers. For example the post-loop-vectorizer ([JDK-8308994](https://bugs.openjdk.org/browse/JDK-8308994)).
>> 
>> Hence, I pull some parts out of SuperWord, and put them in a new class `VLoopAnalyzer`, with submodules:
>> 
>> VLoopAnalyzer
>>   VLoopReductions
>>   VLoopMemorySlices
>>   VLoopBody
>>   VLoopTypes
>> 
>> 
>> **Future Work**
>> In my draft for https://github.com/openjdk/jdk/pull/16620, I also created a submodule `VLoopDependenceGraph`.
>> But that is also a lot of code change.
>> I decided to do this in a separate RFE, to keep this patch here reasonably short.
>> 
>> I also left many functions in `superword.cpp`, even though their classes are in `vectorization.hpp`.
>> I think it is easier to review them in their old palces, with minor changes, for now.
>> In a future RFE, I can then cleanly copy them, without any changes to them.
>
> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
> 
>  - manual merge
>  - move _loop_or_ctrl from ResouceArena, bc ResourceMark in SuperWord::dependence_graph
>  - remove some comments
>  - VLoopTypes
>  - VLoopBody
>  - VLoopMemorySlices
>  - VLoopReductions
>  - 8325589

Looks good now.

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

Marked as reviewed by kvn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17800#pullrequestreview-1878934014


More information about the hotspot-compiler-dev mailing list