13 #ifndef MLIR_DIALECT_SCF_TRANSFORMS_TRANSFORMS_H_ 14 #define MLIR_DIALECT_SCF_TRANSFORMS_TRANSFORMS_H_ 18 #include "llvm/ADT/ArrayRef.h" 23 class ConversionTarget;
29 class RewritePatternSet;
33 class PatternRewriter;
89 scf::ForOp &partialIteration);
106 std::pair<ParallelOp, ParallelOp>
108 bool noMinMaxBounds);
120 TypeConverter &typeConverter, RewritePatternSet &patterns,
121 ConversionTarget &target);
128 scf::ForOp, std::vector<std::pair<Operation *, unsigned>> &)>;
142 std::function<void(Operation *, PipelinerPart, unsigned)>;
155 std::function<Operation *(Operation *, Value, PatternRewriter &)>;
174 #endif // MLIR_DIALECT_SCF_TRANSFORMS_TRANSFORMS_H_ Include the generated interface declarations.
void populateSCFStructuralTypeConversionsAndLegality(TypeConverter &typeConverter, RewritePatternSet &patterns, ConversionTarget &target)
Populates patterns for SCF structural type conversions and sets up the provided ConversionTarget with...
bool peelEpilogue
Control whether the epilogue should be peeled out of the loop or operations should be predicated to s...
std::function< Operation *(Operation *, Value, PatternRewriter &)> PredicateOpFn
AnnotationlFnType annotateFn
std::function< void(Operation *, PipelinerPart, unsigned)> AnnotationlFnType
Lambda called by the pipeliner to allow the user to annotate the IR while it is generated.
GetScheduleFnType getScheduleFn
std::pair< ParallelOp, ParallelOp > tileParallelLoop(ParallelOp op, llvm::ArrayRef< int64_t > tileSizes, bool noMinMaxBounds)
Tile a parallel loop of the form scf.parallel (i0, i1) = (arg0, arg1) to (arg2, arg3) step (arg4...
void populateSCFForLoopCanonicalizationPatterns(RewritePatternSet &patterns)
Populate patterns for canonicalizing operations inside SCF loop bodies.
LogicalResult peelAndCanonicalizeForLoop(RewriterBase &rewriter, ForOp forOp, scf::ForOp &partialIteration)
Rewrite a for loop with bounds/step that potentially do not divide evenly into a for loop where the s...
void naivelyFuseParallelOps(Region ®ion)
Fuses all adjacent scf.parallel operations with identical bounds and step into one scf...
static llvm::ManagedStatic< PassManagerOptions > options
PredicateOpFn predicateFn
void populateSCFLoopPipeliningPatterns(RewritePatternSet &patterns, const PipeliningOption &options)
Populate patterns for SCF software pipelining transformation.
Options to dictate how loops should be pipelined.
std::function< void(scf::ForOp, std::vector< std::pair< Operation *, unsigned > > &)> GetScheduleFnType
Lambda returning all the operation in the forOp, with their stage, in the order picked for the pipeli...