diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h | 30 | 
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h index 94cb76889813..7d33baac52c9 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h +++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/VPlan.h @@ -1357,6 +1357,36 @@ public:  #endif  }; +/// A recipe to compute the pointers for widened memory accesses of IndexTy for +/// all parts. If IsReverse is true, compute pointers for accessing the input in +/// reverse order per part. +class VPVectorPointerRecipe : public VPRecipeBase, public VPValue { +  Type *IndexedTy; +  bool IsReverse; + +public: +  VPVectorPointerRecipe(VPValue *Ptr, Type *IndexedTy, bool IsReverse, +                        DebugLoc DL) +      : VPRecipeBase(VPDef::VPVectorPointerSC, {Ptr}, DL), VPValue(this), +        IndexedTy(IndexedTy), IsReverse(IsReverse) {} + +  VP_CLASSOF_IMPL(VPDef::VPVectorPointerSC) + +  void execute(VPTransformState &State) override; + +  bool onlyFirstLaneUsed(const VPValue *Op) const override { +    assert(is_contained(operands(), Op) && +           "Op must be an operand of the recipe"); +    return true; +  } + +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) +  /// Print the recipe. +  void print(raw_ostream &O, const Twine &Indent, +             VPSlotTracker &SlotTracker) const override; +#endif +}; +  /// A pure virtual base class for all recipes modeling header phis, including  /// phis for first order recurrences, pointer inductions and reductions. The  /// start value is the first operand of the recipe and the incoming value from  | 
