[all-commits] [llvm/llvm-project] f57248: [mlir][Transforms][NFC] GreedyPatternRewriteDriver...

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Dec 7 21:10:57 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f5724847ec6d7e157f711a590e73895e0f048fc4
      https://github.com/llvm/llvm-project/commit/f5724847ec6d7e157f711a590e73895e0f048fc4
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-12-08 (Fri, 08 Dec 2023)

  Changed paths:
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp

  Log Message:
  -----------
  [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.




More information about the All-commits mailing list