23#define GEN_PASS_DEF_LINALGMORPHOPSPASS
24#define GEN_PASS_DEF_LINALGCATEGORIZEOPSPASS
25#include "mlir/Dialect/Linalg/Passes.h.inc"
28#define DEBUG_TYPE "linalg-morphism"
34struct LinalgMorphOpsPass
35 :
public impl::LinalgMorphOpsPassBase<LinalgMorphOpsPass> {
37 using impl::LinalgMorphOpsPassBase<
38 LinalgMorphOpsPass>::LinalgMorphOpsPassBase;
40 void runOnOperation()
override;
43void LinalgMorphOpsPass::runOnOperation() {
48 if (namedToGeneric || categoryToGeneric)
52 if (genericToNamed || categoryToNamed)
56 if (genericToCategory)
65struct LinalgCategorizeOpsPass
66 :
public impl::LinalgCategorizeOpsPassBase<LinalgCategorizeOpsPass> {
68 using impl::LinalgCategorizeOpsPassBase<
69 LinalgCategorizeOpsPass>::LinalgCategorizeOpsPassBase;
71 void runOnOperation()
override;
74void LinalgCategorizeOpsPass::runOnOperation() {
RewritePatternSet & add(ConstructorArg &&arg, ConstructorArgs &&...args)
Add an instance of each of the pattern types 'Ts' to the pattern list with the given arguments.
void populateLinalgGenericOpsSpecializationPatterns(RewritePatternSet &patterns, bool emitCategoryOps=false)
Populates patterns with patterns to convert linalg.generic ops to named or category ops where possibl...
void populateLinalgNamedOpsGeneralizationPatterns(RewritePatternSet &patterns, bool emitCategoryOps=false)
Linalg generalization patterns.
Include the generated interface declarations.
LogicalResult applyPatternsGreedily(Region ®ion, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
Rewrite ops in the given region, which must be isolated from above, by repeatedly applying the highes...