14 #ifndef MLIR_DIALECT_AFFINE_PASSES_H
15 #define MLIR_DIALECT_AFFINE_PASSES_H
38 #include "mlir/Dialect/Affine/Passes.h.inc"
43 std::unique_ptr<OperationPass<func::FuncOp>>
48 std::unique_ptr<OperationPass<func::FuncOp>>
61 std::unique_ptr<OperationPass<func::FuncOp>>
68 unsigned slowMemorySpace,
unsigned fastMemorySpace,
69 unsigned tagMemorySpace = 0,
int minDmaTransferSize = 1024,
72 std::unique_ptr<OperationPass<func::FuncOp>>
78 std::unique_ptr<OperationPass<func::FuncOp>>
91 uint64_t localBufSizeThreshold = 0,
92 bool maximalFusion =
false,
96 std::unique_ptr<OperationPass<func::FuncOp>>
108 int unrollFactor = -1,
bool unrollUpToFactor =
false,
109 bool unrollFull =
false,
110 const std::function<
unsigned(AffineForOp)> &getUnrollFactor =
nullptr);
115 std::unique_ptr<InterfacePass<FunctionOpInterface>>
135 #define GEN_PASS_REGISTRATION
136 #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 > > createRaiseMemrefToAffine()
Creates a pass that converts some memref operators to affine operators.
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 > > createAffineParallelizePass()
Creates a pass to convert all parallel affine.for's into 1-d affine.parallel ops.
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.