[VPlan] Use VPdef for VPWidenCall.
authorFlorian Hahn <flo@fhahn.com>
Tue, 15 Dec 2020 09:11:24 +0000 (09:11 +0000)
committerFlorian Hahn <flo@fhahn.com>
Tue, 15 Dec 2020 09:20:07 +0000 (09:20 +0000)
This patch turns updates VPWidenREcipe to manage the value it defines
using VPDef.

Reviewed By: gilr

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

llvm/lib/Transforms/Vectorize/VPlan.h

index 1d85e92..3c42f47 100644 (file)
@@ -858,13 +858,16 @@ public:
 };
 
 /// A recipe for widening Call instructions.
-class VPWidenCallRecipe : public VPRecipeBase, public VPValue, public VPUser {
+class VPWidenCallRecipe : public VPRecipeBase,
+                          public VPDef,
+                          public VPUser,
+                          public VPValue {
 
 public:
   template <typename IterT>
   VPWidenCallRecipe(CallInst &I, iterator_range<IterT> CallArguments)
-      : VPRecipeBase(VPRecipeBase::VPWidenCallSC),
-        VPValue(VPValue::VPVWidenCallSC, &I), VPUser(CallArguments) {}
+      : VPRecipeBase(VPRecipeBase::VPWidenCallSC), VPUser(CallArguments),
+        VPValue(VPValue::VPVWidenCallSC, &I, this) {}
 
   ~VPWidenCallRecipe() override = default;