14 #ifndef MLIR_DIALECT_AFFINE_PASSES_H
15 #define MLIR_DIALECT_AFFINE_PASSES_H
35 #include "mlir/Dialect/Affine/Passes.h.inc"
40 std::unique_ptr<OperationPass<func::FuncOp>>
45 std::unique_ptr<OperationPass<func::FuncOp>>
51 std::unique_ptr<OperationPass<func::FuncOp>>
58 unsigned slowMemorySpace,
unsigned fastMemorySpace,
59 unsigned tagMemorySpace = 0,
int minDmaTransferSize = 1024,
62 std::unique_ptr<OperationPass<func::FuncOp>>
68 std::unique_ptr<OperationPass<func::FuncOp>>
81 uint64_t localBufSizeThreshold = 0,
82 bool maximalFusion =
false,
86 std::unique_ptr<OperationPass<func::FuncOp>>
98 int unrollFactor = -1,
bool unrollUpToFactor =
false,
99 bool unrollFull =
false,
100 const std::function<
unsigned(AffineForOp)> &getUnrollFactor =
nullptr);
105 std::unique_ptr<InterfacePass<FunctionOpInterface>>
125 #define GEN_PASS_REGISTRATION
126 #include "mlir/Dialect/Affine/Passes.h.inc"
static Value max(ImplicitLocOpBuilder &builder, Value value, Value bound)
std::unique_ptr< OperationPass< func::FuncOp > > createAffineScalarReplacementPass()
Creates a pass to replace affine memref accesses by scalars using store to load forwarding and redund...
std::unique_ptr< OperationPass< func::FuncOp > > createAffineLoopInvariantCodeMotionPass()
Creates a loop invariant code motion pass that hoists loop invariant operations out of affine loops.
std::unique_ptr< OperationPass< func::FuncOp > > createLoopCoalescingPass()
Creates a pass that transforms perfectly nested loops with independent bounds into a single loop.
std::unique_ptr< OperationPass< func::FuncOp > > createAffineLoopNormalizePass(bool promoteSingleIter=false)
Apply normalization transformations to affine loop-like ops.
std::unique_ptr< OperationPass< func::FuncOp > > createAffineDataCopyGenerationPass(unsigned slowMemorySpace, unsigned fastMemorySpace, unsigned tagMemorySpace=0, int minDmaTransferSize=1024, uint64_t fastMemCapacityBytes=std::numeric_limits< uint64_t >::max())
Performs packing (or explicit copying) of accessed memref regions into buffers in the specified faste...
std::unique_ptr< Pass > createLoopFusionPass(unsigned fastMemorySpace=0, uint64_t localBufSizeThreshold=0, bool maximalFusion=false, enum FusionMode fusionMode=FusionMode::Greedy)
Creates a loop fusion pass which fuses affine loop nests at the top-level of the operation the pass i...
FusionMode
Fusion mode to attempt.
std::unique_ptr< OperationPass< func::FuncOp > > createLoopTilingPass(uint64_t cacheSizeBytes)
Creates a pass to perform tiling on loop nests.
std::unique_ptr< Pass > createAffineExpandIndexOpsPass()
Creates a pass to expand affine index operations into more fundamental operations (not necessarily re...
std::unique_ptr< OperationPass< func::FuncOp > > createSimplifyAffineStructuresPass()
Creates a simplification pass for affine structures (maps and sets).
std::unique_ptr< OperationPass< func::FuncOp > > createPipelineDataTransferPass()
Creates a pass to pipeline explicit movement of data across levels of the memory hierarchy.
std::unique_ptr< InterfacePass< FunctionOpInterface > > createLoopUnrollAndJamPass(int unrollJamFactor=-1)
Creates a loop unroll jam pass to unroll jam by the specified factor.
std::unique_ptr< Pass > createAffineExpandIndexOpsAsAffinePass()
Creates a pass to expand affine index operations into affine.apply operations.
std::unique_ptr< InterfacePass< FunctionOpInterface > > createLoopUnrollPass(int unrollFactor=-1, bool unrollUpToFactor=false, bool unrollFull=false, const std::function< unsigned(AffineForOp)> &getUnrollFactor=nullptr)
Creates a loop unrolling pass with the provided parameters.
Include the generated interface declarations.