[llvm] [VPlan] Introduce VPWidenIntrinsicRecipe to separate from libcall. (PR #110486)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 10:00:20 PDT 2024
================
@@ -1608,25 +1609,77 @@ class VPScalarCastRecipe : public VPSingleDefRecipe {
}
};
-/// A recipe for widening Call instructions.
-class VPWidenCallRecipe : public VPRecipeWithIRFlags {
- /// ID of the vector intrinsic to call when widening the call. If set the
- /// Intrinsic::not_intrinsic, a library call will be used instead.
+/// A recipe for widening vector intrinsics.
+class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags {
+ /// ID of the vector intrinsic to widen.
Intrinsic::ID VectorIntrinsicID;
- /// If this recipe represents a library call, Variant stores a pointer to
- /// the chosen function. There is a 1:1 mapping between a given VF and the
- /// chosen vectorized variant, so there will be a different vplan for each
- /// VF with a valid variant.
+
+ /// Scalar type of the result produced by the intrinsic.
+ Type *ResultTy;
+
+ bool MayWriteToMemory;
+ bool MayReadFromMemory;
+ bool MayHaveSideEffects;
+
+public:
+ template <typename IterT>
+ VPWidenIntrinsicRecipe(CallInst &CI, Intrinsic::ID VectorIntrinsicID,
+ iterator_range<IterT> CallArguments, Type *Ty,
----------------
alexey-bataev wrote:
What about ArrayRef<IterT> here instead of iterator_range<IterT>?
https://github.com/llvm/llvm-project/pull/110486
More information about the llvm-commits
mailing list