13 #ifndef MLIR_DIALECT_AFFINE_ANALYSIS_LOOPANALYSIS_H
14 #define MLIR_DIALECT_AFFINE_ANALYSIS_LOOPANALYSIS_H
17 #include "llvm/ADT/ArrayRef.h"
39 SmallVectorImpl<Value> *operands);
60 DenseSet<Value, DenseMapInfo<Value>>
std::optional< uint64_t > getConstantTripCount(AffineForOp forOp)
Returns the trip count of the loop if it's a constant, std::nullopt otherwise.
bool isVectorizableLoopBody(AffineForOp loop, NestedPattern &vectorTransferMatcher)
Checks whether the loop is structurally vectorizable; i.e.
DenseSet< Value, DenseMapInfo< Value > > getInvariantAccesses(Value iv, ArrayRef< Value > indices)
Given an induction variable iv of type AffineForOp and indices of type IndexType, returns the set of ...
void getTripCountMapAndOperands(AffineForOp forOp, AffineMap *map, SmallVectorImpl< Value > *operands)
Returns the trip count of the loop as an affine map with its corresponding operands if the latter is ...
uint64_t getLargestDivisorOfTripCount(AffineForOp forOp)
Returns the greatest known integral divisor of the trip count.
std::function< bool(AffineForOp)> VectorizableLoopFun
bool isOpwiseShiftValid(AffineForOp forOp, ArrayRef< uint64_t > shifts)
Checks where SSA dominance would be violated if a for op's body operations are shifted by the specifi...
This header declares functions that assit transformations in the MemRef dialect.