[all-commits] [llvm/llvm-project] 65c4d6: [VPlan] Add VPCanonicalIVPHIRecipe, partly retire ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Jan 5 02:46:38 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 65c4d6191fc4de95ddabc04ccdf1568dd6145b81
      https://github.com/llvm/llvm-project/commit/65c4d6191fc4de95ddabc04ccdf1568dd6145b81
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanValue.h
    M llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-epilog-vect.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-phi.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-reduction-predselect.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-reduction-types.ll
    M llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll
    M llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll
    M llvm/test/Transforms/LoopVectorize/X86/small-size.ll
    M llvm/test/Transforms/LoopVectorize/X86/tail_loop_folding.ll
    M llvm/test/Transforms/LoopVectorize/discriminator.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/icmp-uniforms.ll
    M llvm/test/Transforms/LoopVectorize/outer-loop-vec-phi-predecessor-order.ll
    M llvm/test/Transforms/LoopVectorize/pointer-induction.ll
    M llvm/test/Transforms/LoopVectorize/pr51614-fold-tail-by-masking.ll
    M llvm/test/Transforms/LoopVectorize/reduction-order.ll
    M llvm/test/Transforms/LoopVectorize/select-reduction.ll
    M llvm/test/Transforms/LoopVectorize/vplan-dot-printing.ll
    M llvm/test/Transforms/LoopVectorize/vplan-printing.ll
    M llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge-vf1.ll
    M llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll
    M llvm/test/Transforms/LoopVectorize/vplan-vectorize-inner-loop-reduction.ll
    M llvm/test/Transforms/LoopVectorize/vplan-widen-call-instruction.ll

  Log Message:
  -----------
  [VPlan] Add VPCanonicalIVPHIRecipe, partly retire createInductionVariable.

At the moment, the primary induction variable for the vector loop is
created as part of the skeleton creation. This is tied to creating the
vector loop latch outside of VPlan. This prevents from modeling the
*whole* vector loop in VPlan, which in turn is required to model
preheader and exit blocks in VPlan as well.

This patch introduces a new recipe VPCanonicalIVPHIRecipe to represent the
primary IV in VPlan and CanonicalIVIncrement{NUW} opcodes for
VPInstruction to model the increment.

This allows us to partly retire createInductionVariable. At the moment,
a bit of patching up is done after executing all blocks in the plan.

Reviewed By: Ayal

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




More information about the All-commits mailing list