diff options
author | River Riddle <riverriddle@google.com> | 2019-08-05 18:37:56 -0700 |
---|---|---|
committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-08-05 18:38:22 -0700 |
commit | a0df3ebd15e84eab052ebf1f9e8cd4e561f7b4aa (patch) | |
tree | c213b80e754258a3998d50d38afa84a792951bea /mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp | |
parent | 3657966e839125bd26edbdf00c874ad1868b038a (diff) | |
download | bcm5719-llvm-a0df3ebd15e84eab052ebf1f9e8cd4e561f7b4aa.tar.gz bcm5719-llvm-a0df3ebd15e84eab052ebf1f9e8cd4e561f7b4aa.zip |
NFC: Implement OwningRewritePatternList as a class instead of a using directive.
This allows for proper forward declaration, as opposed to leaking the internal implementation via a using directive. This also allows for all pattern building to go through 'insert' methods on the OwningRewritePatternList, replacing uses of 'push_back' and 'RewriteListBuilder'.
PiperOrigin-RevId: 261816316
Diffstat (limited to 'mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp')
-rw-r--r-- | mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp b/mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp index e237e8b6eb2..3bd49d43adc 100644 --- a/mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp +++ b/mlir/lib/Dialect/QuantOps/IR/QuantOps.cpp @@ -60,8 +60,7 @@ public: void StorageCastOp::getCanonicalizationPatterns( OwningRewritePatternList &patterns, MLIRContext *context) { - patterns.push_back( - llvm::make_unique<RemoveRedundantStorageCastsRewrite>(context)); + patterns.insert<RemoveRedundantStorageCastsRewrite>(context); } QuantizationDialect::QuantizationDialect(MLIRContext *context) |