From e552a63aa124988f896af376888b885dd12a1b53 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Thu, 11 Apr 2019 13:19:46 -0700 Subject: [PATCH] Update documentation for the DialectOpconversion class: overriding `match()` is optional Recently a default implementation for `match()` was provided (cl/242285885), but the class documentation wasn't updated appropriately. -- PiperOrigin-RevId: 243128738 --- mlir/include/mlir/Transforms/DialectConversion.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mlir/include/mlir/Transforms/DialectConversion.h b/mlir/include/mlir/Transforms/DialectConversion.h index 08f2e0f..5557af3 100644 --- a/mlir/include/mlir/Transforms/DialectConversion.h +++ b/mlir/include/mlir/Transforms/DialectConversion.h @@ -42,8 +42,10 @@ class FunctionConversion; } /// Base class for the dialect op conversion patterns. Specific conversions -/// must derive this class and implement `PatternMatch match(Operation *)` -/// defined in `Pattern` and at least one of `rewrite` and `rewriteTerminator`. +/// must derive this class and implement least one of `rewrite` and +/// `rewriteTerminator`. Optionally they can also override +/// `PatternMatch match(Operation *)` to match more specific operations than the +/// `rootName` provided in the constructor. // // TODO(zinenko): this should eventually converge with RewritePattern. So far, // rewritePattern is missing support for operations with successors as well as -- 2.7.4