[llvm] [LV][VPlan] Add initial support for CSA vectorization (PR #121222)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 27 11:34:10 PST 2024


================
@@ -423,6 +424,71 @@ class InductionDescriptor {
   SmallVector<Instruction *, 2> RedundantCasts;
 };
 
+/// A Conditional Scalar Assignment is an assignment from an initial
+/// scalar that may or may not occur.
+class ConditionalScalarAssignmentDescriptor {
----------------
michaelmaitland wrote:

@fhahn 

You said:

> I don't think CSA is a very common term, would be good to have a more descriptive name if possible

Intel has used the term [conditional scalar assingmnet](https://www.intel.com/content/www/us/en/developer/articles/troubleshooting/fdiag15336.html). I have abbreviated it as CSA for short. I have documented the acronym in the code in this patch in multiple places

> /// A Conditional Scalar Assignment (CSA) is an assignment from an initial
> /// scalar that may or may not occur.

> // This file "describes" induction, recurrence, and conditional scalar
> // assignment (CSA) variables.

> STATISTIC(CSAsVectorized,
> "Number of conditional scalar assignments vectorized");

I thought that ConditionalScalarAssignmentDescriptor, createConditionalScalarAssignmentMaskPhi, and VPConditionalScalarAssignmentDescriptorExtractScalarRecipe were quite long for example.

Do you have any suggestion on what you'd like it to be named? Is expanding CSA to ConditionalScalarAssignment everywhere your preference?

For now, I've tried to be proactive and did some renaming as a fixup in this patch. Please let me know what you think.

https://github.com/llvm/llvm-project/pull/121222


More information about the llvm-commits mailing list