diff options
author | Matthias Springer <me@m-sp.org> | 2023-12-08 14:10:44 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-08 14:10:44 +0900 |
commit | f5724847ec6d7e157f711a590e73895e0f048fc4 (patch) | |
tree | 5db5fd52d7dfac961fd1ad4924b3d7da9f6ea733 /mlir | |
parent | 286ef12b474c16840076e0689e1886660cc9902e (diff) | |
download | llvm-f5724847ec6d7e157f711a590e73895e0f048fc4.zip llvm-f5724847ec6d7e157f711a590e73895e0f048fc4.tar.gz llvm-f5724847ec6d7e157f711a590e73895e0f048fc4.tar.bz2 |
[mlir][Transforms][NFC] GreedyPatternRewriteDriver: Remove redundant worklist management code (#74796)
Do not add the previous users of replaced ops to the worklist during
`notifyOperationReplaced`.
The previous users are modified inplace as part of
`PatternRewriter::replaceOp`, which calls
`PatternRewriter::replaceAllUsesWith`. The latter function updates all
users with `updateRootInPlace`, which already puts all previous users of
the replaced op on the worklist. No further worklist management work is
needed in the `notifyOperationReplaced` callback.
Diffstat (limited to 'mlir')
-rw-r--r-- | mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp index 8e2bfe5..7decbce 100644 --- a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp +++ b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp @@ -581,9 +581,6 @@ void GreedyPatternRewriteDriver::notifyOperationReplaced( }); if (config.listener) config.listener->notifyOperationReplaced(op, replacement); - for (auto result : op->getResults()) - for (auto *user : result.getUsers()) - addToWorklist(user); } LogicalResult GreedyPatternRewriteDriver::notifyMatchFailure( |