Skip to content

Commit c549980

Browse files
committed
Expose findFixedSizeArrayDimensions
1 parent 02f0097 commit c549980

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

llvm/include/llvm/Analysis/Delinearization.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ void delinearize(ScalarEvolution &SE, const SCEV *Expr,
112112
SmallVectorImpl<const SCEV *> &Subscripts,
113113
SmallVectorImpl<const SCEV *> &Sizes, const SCEV *ElementSize);
114114

115+
/// Compute the dimensions of fixed size array from \Expr and save the results
116+
/// in \p Sizes.
117+
bool findFixedSizeArrayDimensions(ScalarEvolution &SE, const SCEV *Expr,
118+
SmallVectorImpl<unsigned> &Sizes,
119+
const SCEV *ElementSize);
120+
115121
/// Split this SCEVAddRecExpr into two vectors of SCEVs representing the
116122
/// subscripts and sizes of an access to a fixed size array. This is a special
117123
/// case of delinearization for fixed size arrays.

llvm/lib/Analysis/Delinearization.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,9 @@ static bool collectConstantAbsSteps(ScalarEvolution &SE, const SCEV *Expr,
530530
return collectConstantAbsSteps(SE, AR->getStart(), Steps, ElementSize);
531531
}
532532

533-
static bool findFixedSizeArrayDimensions(ScalarEvolution &SE, const SCEV *Expr,
534-
SmallVectorImpl<unsigned> &Sizes,
535-
const SCEV *ElementSize) {
533+
bool llvm::findFixedSizeArrayDimensions(ScalarEvolution &SE, const SCEV *Expr,
534+
SmallVectorImpl<unsigned> &Sizes,
535+
const SCEV *ElementSize) {
536536
if (!ElementSize)
537537
return false;
538538

0 commit comments

Comments
 (0)