9 #ifndef MLIR_DIALECT_SCF_TRANSFORMS_PATTERNS_H
10 #define MLIR_DIALECT_SCF_TRANSFORMS_PATTERNS_H
18 class ConversionTarget;
static llvm::ManagedStatic< PassManagerOptions > options
This class describes a specific conversion target.
MLIRContext is the top-level object for a collection of MLIR operations.
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current I...
ForLoopPipeliningPattern(const PipeliningOption &options, MLIRContext *context)
LogicalResult matchAndRewrite(ForOp forOp, PatternRewriter &rewriter) const override
FailureOr< ForOp > returningMatchAndRewrite(ForOp forOp, PatternRewriter &rewriter) const
void populateSCFStructuralTypeConversionsAndLegality(const TypeConverter &typeConverter, RewritePatternSet &patterns, ConversionTarget &target)
Populates patterns for SCF structural type conversions and sets up the provided ConversionTarget with...
void populateSCFLoopPipeliningPatterns(RewritePatternSet &patterns, const PipeliningOption &options)
Populate patterns for SCF software pipelining transformation.
void populateSCFRotateWhileLoopPatterns(RewritePatternSet &patterns)
Populate patterns to rotate scf.while ops, constructing do-while loops from while loops.
void populateUpliftWhileToForPatterns(RewritePatternSet &patterns)
Populate patterns to uplift scf.while ops to scf.for.
void populateSCFStructuralTypeConversions(const TypeConverter &typeConverter, RewritePatternSet &patterns)
Similar to populateSCFStructuralTypeConversionsAndLegality but does not populate the conversion targe...
void populateSCFForLoopCanonicalizationPatterns(RewritePatternSet &patterns)
Populate patterns for canonicalizing operations inside SCF loop bodies.
void populateSCFStructuralOneToNTypeConversions(const TypeConverter &typeConverter, RewritePatternSet &patterns)
Populates the provided pattern set with patterns that do 1:N type conversions on (some) SCF ops.
FailureOr< ForOp > pipelineForLoop(RewriterBase &rewriter, ForOp forOp, const PipeliningOption &options, bool *modifiedIR=nullptr)
Generate a pipelined version of the scf.for loop based on the schedule given as option.
void populateSCFStructuralTypeConversionTarget(const TypeConverter &typeConverter, ConversionTarget &target)
Updates the ConversionTarget with dynamic legality of SCF operations based on the provided type conve...
Include the generated interface declarations.
OpRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an...
Options to dictate how loops should be pipelined.