14 #ifndef MLIR_DIALECT_AFFINE_PASSES_H
15 #define MLIR_DIALECT_AFFINE_PASSES_H
34 #include "mlir/Dialect/Affine/Passes.h.inc"
39 std::unique_ptr<OperationPass<func::FuncOp>>
44 std::unique_ptr<OperationPass<func::FuncOp>>
54 std::unique_ptr<OperationPass<func::FuncOp>>
61 unsigned slowMemorySpace,
unsigned fastMemorySpace,
62 unsigned tagMemorySpace = 0,
int minDmaTransferSize = 1024,
65 std::unique_ptr<OperationPass<func::FuncOp>>
71 std::unique_ptr<OperationPass<func::FuncOp>>
84 uint64_t localBufSizeThreshold = 0,
85 bool maximalFusion =
false,
89 std::unique_ptr<OperationPass<func::FuncOp>>
101 int unrollFactor = -1,
bool unrollUpToFactor =
false,
102 bool unrollFull =
false,
103 const std::function<
unsigned(AffineForOp)> &getUnrollFactor =
nullptr);
108 std::unique_ptr<OperationPass<func::FuncOp>>
128 #define GEN_PASS_REGISTRATION
129 #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< OperationPass< func::FuncOp > > createAffineParallelizePass()
Creates a pass to convert all parallel affine.for's into 1-d affine.parallel ops.
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< OperationPass< func::FuncOp > > 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< OperationPass< func::FuncOp > > 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.