@@ -497,12 +497,12 @@ static std::optional<APInt> tryIntoAPInt(const SCEV *S) {
497497// / Expr is divisible by \p ElementSize. Each step recurrence is stored in \p
498498// / Steps after divided by \p ElementSize.
499499static bool collectConstantAbsSteps (ScalarEvolution &SE, const SCEV *Expr,
500- SmallVectorImpl<unsigned > &Steps,
501- unsigned ElementSize) {
500+ SmallVectorImpl<uint64_t > &Steps,
501+ uint64_t ElementSize) {
502502 // End of recursion. The constant value also must be a multiple of
503503 // ElementSize.
504504 if (const auto *Const = dyn_cast<SCEVConstant>(Expr)) {
505- const unsigned Mod = Const->getAPInt ().urem (ElementSize);
505+ const uint64_t Mod = Const->getAPInt ().urem (ElementSize);
506506 return Mod == 0 ;
507507 }
508508
@@ -522,7 +522,7 @@ static bool collectConstantAbsSteps(ScalarEvolution &SE, const SCEV *Expr,
522522 return false ;
523523
524524 // Bail out when the step is too large.
525- std::optional<unsigned > StepVal = Q.tryZExtValue ();
525+ std::optional<uint64_t > StepVal = Q.tryZExtValue ();
526526 if (!StepVal)
527527 return false ;
528528
@@ -531,7 +531,7 @@ static bool collectConstantAbsSteps(ScalarEvolution &SE, const SCEV *Expr,
531531}
532532
533533bool llvm::findFixedSizeArrayDimensions (ScalarEvolution &SE, const SCEV *Expr,
534- SmallVectorImpl<unsigned > &Sizes,
534+ SmallVectorImpl<uint64_t > &Sizes,
535535 const SCEV *ElementSize) {
536536 if (!ElementSize)
537537 return false ;
@@ -540,7 +540,7 @@ bool llvm::findFixedSizeArrayDimensions(ScalarEvolution &SE, const SCEV *Expr,
540540 if (!ElementSizeAPInt || *ElementSizeAPInt == 0 )
541541 return false ;
542542
543- std::optional<unsigned > ElementSizeConst = ElementSizeAPInt->tryZExtValue ();
543+ std::optional<uint64_t > ElementSizeConst = ElementSizeAPInt->tryZExtValue ();
544544
545545 // Early exit when ElementSize is not a positive constant.
546546 if (!ElementSizeConst)
@@ -578,7 +578,7 @@ bool llvm::findFixedSizeArrayDimensions(ScalarEvolution &SE, const SCEV *Expr,
578578 Sizes.back () = 1 ;
579579
580580 for (unsigned I = 0 ; I + 1 < Sizes.size (); I++) {
581- unsigned PrevSize = Sizes[I + 1 ];
581+ uint64_t PrevSize = Sizes[I + 1 ];
582582 if (Sizes[I] % PrevSize) {
583583 Sizes.clear ();
584584 return false ;
@@ -648,14 +648,14 @@ bool llvm::delinearizeFixedSizeArray(ScalarEvolution &SE, const SCEV *Expr,
648648 const SCEV *ElementSize) {
649649
650650 // First step: find the fixed array size.
651- SmallVector<unsigned , 4 > ConstSizes;
651+ SmallVector<uint64_t , 4 > ConstSizes;
652652 if (!findFixedSizeArrayDimensions (SE, Expr, ConstSizes, ElementSize)) {
653653 Sizes.clear ();
654654 return false ;
655655 }
656656
657657 // Convert the constant size to SCEV.
658- for (unsigned Size : ConstSizes)
658+ for (uint64_t Size : ConstSizes)
659659 Sizes.push_back (SE.getConstant (Expr->getType (), Size));
660660
661661 // Second step: compute the access functions for each subscript.
0 commit comments