[PATCH] D138748: [VPlan] Summarize recipes used to model inductions.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 27 15:12:22 PST 2022


Ayal added a comment.

Thanks for following up! Adding some thoughts to consider.



================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:1133
+///
+/// Inductions are modeled using the following sub-classes:
+///  * VPCanonicalIVPHIRecipe: Canonical scalar induction of the vector loop,
----------------
Worth indicating which of these produce a value per iteration, per part, per lane?


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:1135
+///  * VPCanonicalIVPHIRecipe: Canonical scalar induction of the vector loop,
+///    starting at a specified value and stepping by 1.
+///  * VPWidenIntOrFpInductionRecipe: Generates vector values for integer and
----------------
Worth adding that this induction controls the vector loop, by comparing it with the vector trip count?
Starting value is specified as zero for main vector loop or where the main vector loop left off for the epilog vector loop (until fixed..).


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:1137
+///  * VPWidenIntOrFpInductionRecipe: Generates vector values for integer and
+///    floating point inductions with arbitrary start and step values.
+///  * VPScalarIVStepsRecipe: Generates scalar values for integer and floating
----------------
Worth adding that this is done by introducing an independent vector header phi?


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:1139
+///  * VPScalarIVStepsRecipe: Generates scalar values for integer and floating
+///    point inductions with arbitrary start and step values.
+///  * VPWidenPointerInductionRecipe: Generate vector and scalar values for a
----------------
So perhaps a more consistent name would be VPScalarIntOrFpInductionRecipe?
Worth adding that these scalar values are computed based on the canonical IV recipe, rather than forming additional header phi's.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:1141
+///  * VPWidenPointerInductionRecipe: Generate vector and scalar values for a
+///    pointer induction.
 class VPHeaderPHIRecipe : public VPRecipeBase, public VPValue {
----------------
So perhaps a more consistent name would be VPPointerInductionRecipe?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138748/new/

https://reviews.llvm.org/D138748



More information about the llvm-commits mailing list