[llvm-branch-commits] [llvm] 318f579 - [VPlan] Use VPDef for VPWidenGEPRecipe.
Florian Hahn via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Dec 15 01:41:24 PST 2020
Author: Florian Hahn
Date: 2020-12-15T09:30:14Z
New Revision: 318f5798d8cb375e5af07812cede2f041ef839fe
URL: https://github.com/llvm/llvm-project/commit/318f5798d8cb375e5af07812cede2f041ef839fe
DIFF: https://github.com/llvm/llvm-project/commit/318f5798d8cb375e5af07812cede2f041ef839fe.diff
LOG: [VPlan] Use VPDef for VPWidenGEPRecipe.
This patch turns updates VPWidenGEPRecipe to manage the value it defines
using VPDef. The VPValue is used during VPlan construction and
codegeneration instead of the plain IR reference where possible.
Reviewed By: gilr
Differential Revision: https://reviews.llvm.org/D90561
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.h
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 3c42f47ff9f6..2b3808b74b74 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -914,21 +914,25 @@ class VPWidenSelectRecipe : public VPRecipeBase, public VPValue, public VPUser {
};
/// A recipe for handling GEP instructions.
-class VPWidenGEPRecipe : public VPRecipeBase, public VPValue, public VPUser {
+class VPWidenGEPRecipe : public VPRecipeBase,
+ public VPDef,
+ public VPUser,
+ public VPValue {
bool IsPtrLoopInvariant;
SmallBitVector IsIndexLoopInvariant;
public:
template <typename IterT>
VPWidenGEPRecipe(GetElementPtrInst *GEP, iterator_range<IterT> Operands)
- : VPRecipeBase(VPRecipeBase::VPWidenGEPSC), VPValue(VPWidenGEPSC, GEP),
- VPUser(Operands), IsIndexLoopInvariant(GEP->getNumIndices(), false) {}
+ : VPRecipeBase(VPRecipeBase::VPWidenGEPSC), VPUser(Operands),
+ VPValue(VPWidenGEPSC, GEP, this),
+ IsIndexLoopInvariant(GEP->getNumIndices(), false) {}
template <typename IterT>
VPWidenGEPRecipe(GetElementPtrInst *GEP, iterator_range<IterT> Operands,
Loop *OrigLoop)
- : VPRecipeBase(VPRecipeBase::VPWidenGEPSC),
- VPValue(VPValue::VPVWidenGEPSC, GEP), VPUser(Operands),
+ : VPRecipeBase(VPRecipeBase::VPWidenGEPSC), VPUser(Operands),
+ VPValue(VPValue::VPVWidenGEPSC, GEP, this),
IsIndexLoopInvariant(GEP->getNumIndices(), false) {
IsPtrLoopInvariant = OrigLoop->isLoopInvariant(GEP->getPointerOperand());
for (auto Index : enumerate(GEP->indices()))
More information about the llvm-branch-commits
mailing list