diff options
Diffstat (limited to 'mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp')
| -rw-r--r-- | mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp index aa4563c96e4..e2ca3f8fc5e 100644 --- a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp +++ b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp @@ -86,12 +86,11 @@ public: // These are hooks implemented for PatternRewriter. protected: - // Implement the hook for creating operations, and make sure that newly - // created ops are added to the worklist for processing. - Operation *createOperation(const OperationState &state) override { - auto *result = OpBuilder::createOperation(state); - addToWorklist(result); - return result; + // Implement the hook for inserting operations, and make sure that newly + // inserted ops are added to the worklist for processing. + Operation *insert(Operation *op) override { + addToWorklist(op); + return OpBuilder::insert(op); } // If an operation is about to be removed, make sure it is not in our |

