JDK-8315361 : C2 SuperWord: refactor out loop analysis into shared auto-vectorization facility VLoopAnalyzer
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 22
  • Priority: P4
  • Status: In Progress
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2023-08-30
  • Updated: 2024-01-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Blocks :  
CSR :  
Relates :  
Relates :  
Sub Tasks
JDK-8317572 :  
JDK-8324750 :  
JDK-8324752 :  
JDK-8324765 :  
JDK-8324775 :  
JDK-8324794 :  
Description
Before proceeding with the new post loop vectorizer work (JDK-8308994), we would like to create a superclass of current SuperWord class and move common vectorization related utilities and logics inside.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16620 Date: 2023-11-10 17:24:22 +0000
24-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16353 Date: 2023-10-25 01:58:13 +0000
25-10-2023

Good question. Emanuel suggested adding a super class in the review discussion of JDK-8308994. It's expected to have 2 sub classes, SuperWord and VectorMaskLoop (for experimental post loop vectorization in JDK-8308994) so the two vectorizers can share some common logics in the future. I'm not sure if this is the best approach. But I will do some experiment together with the patch of JDK-8308894 first.
30-08-2023

Just wondering, is a super class required or could it also be solved by using composition?
30-08-2023

I see, that sounds good. In general, I'm favoring composition over (implementation) inheritance together with using common interfaces, as for example for SuperWord and VectorMaskLoop, in order to specify behavior which is then implemented in the implementing classes. But of course, that's just a personal opinion formed over time. It always depends on the use case, the existing code etc.
30-08-2023