MLIR 22.0.0git
LoopTiling.cpp File Reference
#include "mlir/Dialect/Affine/Passes.h"
#include "mlir/Dialect/Affine/Analysis/AffineAnalysis.h"
#include "mlir/Dialect/Affine/Analysis/AffineStructures.h"
#include "mlir/Dialect/Affine/Analysis/LoopAnalysis.h"
#include "mlir/Dialect/Affine/Analysis/Utils.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Affine/LoopUtils.h"
#include "mlir/Dialect/Affine/Utils.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include <optional>
#include "mlir/Dialect/Affine/Passes.h.inc"

Go to the source code of this file.

Classes

class  mlir::affine::impl::AffineLoopTilingBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::affine
namespace  mlir::affine::impl

Macros

#define GEN_PASS_DEF_AFFINELOOPTILING
#define DEBUG_TYPE   "affine-loop-tile"

Functions

static void getTopLevelTileableBands (func::FuncOp f, std::vector< SmallVector< AffineForOp, 6 > > &bands)
 Get bands of loops that are valid to tile from the top-level of f.
static void adjustToDivisorsOfTripCounts (ArrayRef< AffineForOp > band, SmallVectorImpl< unsigned > *tileSizes)
 Reduces each tile size to the largest divisor of the corresponding trip count (if the trip count is known).

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "affine-loop-tile"

Definition at line 37 of file LoopTiling.cpp.

◆ GEN_PASS_DEF_AFFINELOOPTILING

#define GEN_PASS_DEF_AFFINELOOPTILING

Definition at line 29 of file LoopTiling.cpp.

Function Documentation

◆ adjustToDivisorsOfTripCounts()

void adjustToDivisorsOfTripCounts ( ArrayRef< AffineForOp > band,
SmallVectorImpl< unsigned > * tileSizes )
static

Reduces each tile size to the largest divisor of the corresponding trip count (if the trip count is known).

Definition at line 89 of file LoopTiling.cpp.

References mlir::affine::getConstantTripCount().

◆ getTopLevelTileableBands()

void getTopLevelTileableBands ( func::FuncOp f,
std::vector< SmallVector< AffineForOp, 6 > > & bands )
static

Get bands of loops that are valid to tile from the top-level of f.

Definition at line 64 of file LoopTiling.cpp.

References mlir::affine::getPerfectlyNestedLoops(), and mlir::affine::isTilingValid().