[llvm] 29e8de5 - [VPlan] Summarize recipes used to model inductions (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 11 08:29:09 PST 2022


Author: Florian Hahn
Date: 2022-12-11T16:28:43Z
New Revision: 29e8de5de1611dad9c71f351616992ceaeb5c5cc

URL: https://github.com/llvm/llvm-project/commit/29e8de5de1611dad9c71f351616992ceaeb5c5cc
DIFF: https://github.com/llvm/llvm-project/commit/29e8de5de1611dad9c71f351616992ceaeb5c5cc.diff

LOG: [VPlan] Summarize recipes used to model inductions (NFC).

Document recipes used to model inductions after introducing
VPDerivedIVRecipe in 0c5df7cd2f81c.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D138748

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlan.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 2e79cdf6eff61..17ed42744d3e4 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1129,6 +1129,25 @@ class VPWidenIntOrFpInductionRecipe : public VPRecipeBase, public VPValue {
 /// phis for first order recurrences, pointer inductions and reductions. The
 /// start value is the first operand of the recipe and the incoming value from
 /// the backedge is the second operand.
+///
+/// Inductions are modeled using the following sub-classes:
+///  * VPCanonicalIVPHIRecipe: Canonical scalar induction of the vector loop,
+///    starting at a specified value (zero for the main vector loop, the resume
+///    value for the epilogue vector loop) and stepping by 1. The induction
+///    controls exiting of the vector loop by comparing against the vector trip
+///    count. Produces a single scalar PHI for the induction value per
+///    iteration.
+///  * VPWidenIntOrFpInductionRecipe: Generates vector values for integer and
+///    floating point inductions with arbitrary start and step values. Produces
+///    a vector PHI per-part.
+///  * VPDerivedIVRecipe: Converts the canonical IV value to the corresponding
+///    value of an IV with 
diff erent start and step values. Produces a single
+///    scalar value per iteration
+///  * VPScalarIVStepsRecipe: Generates scalar values per-lane based on a
+///    canonical or derived induction.
+///  * VPWidenPointerInductionRecipe: Generate vector and scalar values for a
+///    pointer induction. Produces either a vector PHI per-part or scalar values
+///    per-lane based on the canonical induction.
 class VPHeaderPHIRecipe : public VPRecipeBase, public VPValue {
 protected:
   VPHeaderPHIRecipe(unsigned char VPVID, unsigned char VPDefID, PHINode *Phi,


        


More information about the llvm-commits mailing list