MLIR  20.0.0git
Macros | Typedefs | Functions
LoopAnalysis.cpp File Reference
#include "mlir/Dialect/Affine/Analysis/LoopAnalysis.h"
#include "mlir/Analysis/SliceAnalysis.h"
#include "mlir/Dialect/Affine/Analysis/AffineAnalysis.h"
#include "mlir/Dialect/Affine/Analysis/AffineStructures.h"
#include "mlir/Dialect/Affine/Analysis/NestedMatcher.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Affine/IR/AffineValueMap.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Debug.h"
#include <numeric>
#include <optional>
#include <type_traits>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "affine-loop-analysis"
 

Typedefs

using VectorizableOpFun = std::function< bool(AffineForOp, Operation &)>
 

Functions

static bool isAccessIndexInvariant (Value iv, Value index)
 Given an affine.for iv and an access index of type index, returns true if index is independent of iv and false otherwise. More...
 
template<typename LoadOrStoreOp >
static bool isVectorElement (LoadOrStoreOp memoryOp)
 
static bool isVectorizableLoopBodyWithOpCond (AffineForOp loop, const VectorizableOpFun &isVectorizableOp, NestedPattern &vectorTransferMatcher)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "affine-loop-analysis"

Definition at line 34 of file LoopAnalysis.cpp.

Typedef Documentation

◆ VectorizableOpFun

using VectorizableOpFun = std::function<bool(AffineForOp, Operation &)>

Definition at line 252 of file LoopAnalysis.cpp.

Function Documentation

◆ isAccessIndexInvariant()

static bool isAccessIndexInvariant ( Value  iv,
Value  index 
)
static

Given an affine.for iv and an access index of type index, returns true if index is independent of iv and false otherwise.

Prerequisites: iv and index of the proper type;

Definition at line 156 of file LoopAnalysis.cpp.

References mlir::affine::AffineValueMap::composeSimplifyAndCanonicalize(), mlir::Value::getContext(), mlir::AffineMap::getMultiDimIdentityMap(), mlir::Value::getType(), mlir::affine::isAffineForInductionVar(), and mlir::affine::AffineValueMap::isFunctionOf().

Referenced by mlir::affine::getInvariantAccesses(), and mlir::affine::isContiguousAccess().

◆ isVectorElement()

template<typename LoadOrStoreOp >
static bool isVectorElement ( LoadOrStoreOp  memoryOp)
static

Definition at line 247 of file LoopAnalysis.cpp.

◆ isVectorizableLoopBodyWithOpCond()

static bool isVectorizableLoopBodyWithOpCond ( AffineForOp  loop,
const VectorizableOpFun isVectorizableOp,
NestedPattern vectorTransferMatcher 
)
static