[mlir] Canonicalizer constructor should accept disabled/enabled patterns
authorMogball <jeffniu22@gmail.com>
Tue, 21 Dec 2021 01:18:14 +0000 (01:18 +0000)
committerMogball <jeffniu22@gmail.com>
Wed, 22 Dec 2021 19:08:31 +0000 (19:08 +0000)
commit42ac4f3dc6e673e44fa9fcbb40d4200be2d1e2c1
tree46cceab4f94dd190418927e107249111bf7db060
parent25226f3e4a42f70124995c16e22ff870efa30c6d
[mlir] Canonicalizer constructor should accept disabled/enabled patterns

There is no way to programmatically configure the list of disabled and enabled patterns in the canonicalizer pass, other than the duplicate the whole pass. This patch exposes the `disabledPatterns` and `enabledPatterns` options.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D116055
mlir/include/mlir/Rewrite/FrozenRewritePatternSet.h
mlir/include/mlir/Transforms/Passes.h
mlir/lib/Transforms/Canonicalizer.cpp