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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 10 09:41:54 PST 2022


fhahn marked 4 inline comments as done.
fhahn added inline comments.


================
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,
----------------
Ayal wrote:
> Worth indicating which of these produce a value per iteration, per part, per lane?
Thanks, updated!


================
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
----------------
Ayal wrote:
> 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..).
Added, thanks!


================
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
----------------
Ayal wrote:
> 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.
Updated the wording, but kept the name for now to just reflect the current realities in the documentation, thanks!


================
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 {
----------------
Ayal wrote:
> So perhaps a more consistent name would be VPPointerInductionRecipe?
I am planning to handle the non-widening case by using derived IV + scalar steps in future patches.


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