[LoopVectorize] Extract InductionInfo into a helper class...
[oota-llvm.git] / lib / Transforms / Scalar / LoopInterchange.cpp
index b99210a7a6bdc8cfdad89e67c981720ba3150d46..bbd586c7573c1b02d5815aaa3cfca4f4a01f367f 100644 (file)
@@ -698,9 +698,9 @@ bool LoopInterchangeLegality::findInductionAndReductions(
     return false;
   for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
     RecurrenceDescriptor RD;
+    InductionDescriptor ID;
     PHINode *PHI = cast<PHINode>(I);
-    ConstantInt *StepValue = nullptr;
-    if (isInductionPHI(PHI, SE, StepValue))
+    if (InductionDescriptor::isInductionPHI(PHI, SE, ID))
       Inductions.push_back(PHI);
     else if (RecurrenceDescriptor::isReductionPHI(PHI, L, RD))
       Reductions.push_back(PHI);