@@ -403,17 +403,17 @@ class SCEVValidator : public SCEVVisitor<SCEVValidator, ValidatorResult> {
403403 if (!PollyAllowUnsignedOperations)
404404 return ValidatorResult (SCEVType::INVALID);
405405
406- auto *Dividend = Expr->getLHS ();
407- auto *Divisor = Expr->getRHS ();
406+ const SCEV *Dividend = Expr->getLHS ();
407+ const SCEV *Divisor = Expr->getRHS ();
408408 return visitDivision (Dividend, Divisor, Expr);
409409 }
410410
411411 ValidatorResult visitSDivInstruction (Instruction *SDiv, const SCEV *Expr) {
412412 assert (SDiv->getOpcode () == Instruction::SDiv &&
413413 " Assumed SDiv instruction!" );
414414
415- auto *Dividend = SE.getSCEV (SDiv->getOperand (0 ));
416- auto *Divisor = SE.getSCEV (SDiv->getOperand (1 ));
415+ const SCEV *Dividend = SE.getSCEV (SDiv->getOperand (0 ));
416+ const SCEV *Divisor = SE.getSCEV (SDiv->getOperand (1 ));
417417 return visitDivision (Dividend, Divisor, Expr, SDiv);
418418 }
419419
@@ -427,7 +427,7 @@ class SCEVValidator : public SCEVVisitor<SCEVValidator, ValidatorResult> {
427427 return visitGenericInst (SRem, S);
428428
429429 auto *Dividend = SRem->getOperand (0 );
430- auto *DividendSCEV = SE.getSCEV (Dividend);
430+ const SCEV *DividendSCEV = SE.getSCEV (Dividend);
431431 return visit (DividendSCEV);
432432 }
433433
@@ -566,11 +566,11 @@ class SCEVFindValues final {
566566 Inst->getOpcode () != Instruction::SDiv))
567567 return false ;
568568
569- auto *Dividend = SE.getSCEV (Inst->getOperand (1 ));
569+ const SCEV *Dividend = SE.getSCEV (Inst->getOperand (1 ));
570570 if (!isa<SCEVConstant>(Dividend))
571571 return false ;
572572
573- auto *Divisor = SE.getSCEV (Inst->getOperand (0 ));
573+ const SCEV *Divisor = SE.getSCEV (Inst->getOperand (0 ));
574574 SCEVFindValues FindValues (SE, Values);
575575 SCEVTraversal<SCEVFindValues> ST (FindValues);
576576 ST.visitAll (Dividend);
@@ -623,7 +623,7 @@ bool polly::isAffineExpr(const Region *R, llvm::Loop *Scope, const SCEV *Expr,
623623
624624static bool isAffineExpr (Value *V, const Region *R, Loop *Scope,
625625 ScalarEvolution &SE, ParameterSetTy &Params) {
626- auto *E = SE.getSCEV (V);
626+ const SCEV *E = SE.getSCEV (V);
627627 if (isa<SCEVCouldNotCompute>(E))
628628 return false ;
629629
@@ -684,10 +684,10 @@ polly::extractConstantFactor(const SCEV *S, ScalarEvolution &SE) {
684684
685685 auto *AddRec = dyn_cast<SCEVAddRecExpr>(S);
686686 if (AddRec) {
687- auto *StartExpr = AddRec->getStart ();
687+ const SCEV *StartExpr = AddRec->getStart ();
688688 if (StartExpr->isZero ()) {
689689 auto StepPair = extractConstantFactor (AddRec->getStepRecurrence (SE), SE);
690- auto *LeftOverAddRec =
690+ const SCEV *LeftOverAddRec =
691691 SE.getAddRecExpr (StartExpr, StepPair.second , AddRec->getLoop (),
692692 AddRec->getNoWrapFlags ());
693693 return std::make_pair (StepPair.first , LeftOverAddRec);
@@ -717,7 +717,7 @@ polly::extractConstantFactor(const SCEV *S, ScalarEvolution &SE) {
717717 return std::make_pair (ConstPart, S);
718718 }
719719
720- auto *NewAdd = SE.getAddExpr (LeftOvers, Add->getNoWrapFlags ());
720+ const SCEV *NewAdd = SE.getAddExpr (LeftOvers, Add->getNoWrapFlags ());
721721 return std::make_pair (Factor, NewAdd);
722722 }
723723
@@ -726,7 +726,7 @@ polly::extractConstantFactor(const SCEV *S, ScalarEvolution &SE) {
726726 return std::make_pair (ConstPart, S);
727727
728728 SmallVector<const SCEV *, 4 > LeftOvers;
729- for (auto *Op : Mul->operands ())
729+ for (const SCEV *Op : Mul->operands ())
730730 if (isa<SCEVConstant>(Op))
731731 ConstPart = cast<SCEVConstant>(SE.getMulExpr (ConstPart, Op));
732732 else
0 commit comments