MLIR  19.0.0git
Namespaces | Typedefs | Functions
LoopAnalysis.h File Reference
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
#include <optional>

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::affine
 

Typedefs

using mlir::affine::VectorizableLoopFun = std::function< bool(AffineForOp)>
 

Functions

void mlir::affine::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 expressible as an affine expression, and nullptr otherwise. More...
 
std::optional< uint64_t > mlir::affine::getConstantTripCount (AffineForOp forOp)
 Returns the trip count of the loop if it's a constant, std::nullopt otherwise. More...
 
uint64_t mlir::affine::getLargestDivisorOfTripCount (AffineForOp forOp)
 Returns the greatest known integral divisor of the trip count. More...
 
template<typename LoadOrStoreOp >
bool mlir::affine::isInvariantAccess (LoadOrStoreOp memOp, AffineForOp forOp)
 Checks if an affine read or write operation depends on forOp's IV, i.e., if the memory access is invariant on forOp. More...
 
DenseSet< Value, DenseMapInfo< Value > > mlir::affine::getInvariantAccesses (Value iv, ArrayRef< Value > indices)
 Given an induction variable iv of type AffineForOp and indices of type IndexType, returns the set of indices that are independent of iv. More...
 
template<typename LoadOrStoreOp >
bool mlir::affine::isContiguousAccess (Value iv, LoadOrStoreOp memoryOp, int *memRefDim)
 Given: More...
 
bool mlir::affine::isVectorizableLoopBody (AffineForOp loop, NestedPattern &vectorTransferMatcher)
 Checks whether the loop is structurally vectorizable; i.e. More...
 
bool mlir::affine::isVectorizableLoopBody (AffineForOp loop, int *memRefDim, NestedPattern &vectorTransferMatcher)
 Checks whether the loop is structurally vectorizable and that all the LoadOp and StoreOp matched have access indexing functions that are either: More...
 
bool mlir::affine::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 specified shifts. More...