23 #define GEN_PASS_DEF_LINALGMORPHOPSPASS
24 #include "mlir/Dialect/Linalg/Passes.h.inc"
27 #define DEBUG_TYPE "linalg-morphism"
33 struct LinalgMorphOpsPass
34 :
public impl::LinalgMorphOpsPassBase<LinalgMorphOpsPass> {
36 using impl::LinalgMorphOpsPassBase<
37 LinalgMorphOpsPass>::LinalgMorphOpsPassBase;
39 void runOnOperation()
override;
42 void LinalgMorphOpsPass::runOnOperation() {
47 if (namedToCategory) {
50 if (namedToGeneric || categoryToGeneric) {
static MLIRContext * getContext(OpFoldResult val)
void populateLinalgNamedOpsGeneralizationPatterns(RewritePatternSet &patterns)
Linalg generalization patterns.
void populateLinalgGenericOpsSpecializationPatterns(RewritePatternSet &patterns)
Populates patterns with patterns to convert linalg.generic ops to named ops where possible.
void populateLinalgNamedToElementwisePatterns(RewritePatternSet &patterns)
Populates patterns that convert linalg named ops e.g.
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...
const FrozenRewritePatternSet & patterns