@@ -642,7 +642,7 @@ bool llvm::findFixedSizeArrayDimensions(ScalarEvolution &SE, const SCEV *Expr,
642642/// TODO: At the moment, this function can handle only simple cases. For
643643/// example, we cannot handle a case where a step recurrence is not divisible
644644/// by the next smaller step recurrence, e.g., A[i][3*j].
645- void llvm::delinearizeFixedSizeArray(ScalarEvolution &SE, const SCEV *Expr,
645+ bool llvm::delinearizeFixedSizeArray(ScalarEvolution &SE, const SCEV *Expr,
646646 SmallVectorImpl<const SCEV *> &Subscripts,
647647 SmallVectorImpl<const SCEV *> &Sizes,
648648 const SCEV *ElementSize) {
@@ -651,7 +651,7 @@ void llvm::delinearizeFixedSizeArray(ScalarEvolution &SE, const SCEV *Expr,
651651 SmallVector<unsigned, 4> ConstSizes;
652652 if (!findFixedSizeArrayDimensions(SE, Expr, ConstSizes, ElementSize)) {
653653 Sizes.clear();
654- return;
654+ return false ;
655655 }
656656
657657 // Convert the constant size to SCEV.
@@ -661,8 +661,7 @@ void llvm::delinearizeFixedSizeArray(ScalarEvolution &SE, const SCEV *Expr,
661661 // Second step: compute the access functions for each subscript.
662662 computeAccessFunctions(SE, Expr, Subscripts, Sizes);
663663
664- if (Subscripts.empty())
665- return;
664+ return !Subscripts.empty();
666665}
667666
668667bool llvm::getIndexExpressionsFromGEP(ScalarEvolution &SE,
0 commit comments