[ODS] Implement a new 'hasCanonicalizeMethod' bit for cann patterns.
This provides a simplified way to implement 'matchAndRewrite' style canonicalization patterns for ops that don't need the full power of RewritePatterns. Using this style, you can implement a static method with a signature like: ``` LogicalResult AssertOp::canonicalize(AssertOp op, PatternRewriter &rewriter) { return success(); } ``` instead of dealing with defining RewritePattern subclasses. This also adopts this for a few canonicalization patterns in the std dialect to show how it works. Differential Revision: https://reviews.llvm.org/D99143
Loading
Please register or sign in to comment