[all-commits] [llvm/llvm-project] 9297b9: [mlir][Transforms][NFC] Improve builder/listener A...

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed Mar 22 01:25:06 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9297b9f8eeecc5ea6571cf45985ba77bc2960427
      https://github.com/llvm/llvm-project/commit/9297b9f8eeecc5ea6571cf45985ba77bc2960427
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-03-22 (Wed, 22 Mar 2023)

  Changed paths:
    M mlir/include/mlir/IR/PatternMatch.h
    M mlir/include/mlir/Transforms/FoldUtils.h
    M mlir/lib/Transforms/SCCP.cpp
    M mlir/lib/Transforms/Utils/FoldUtils.cpp
    M mlir/test/lib/Transforms/TestIntRangeInference.cpp

  Log Message:
  -----------
  [mlir][Transforms][NFC] Improve builder/listener API of OperationFolder

The constructor of `OperationFolder` takes a listener. Therefore, the remaining API should not take any builder/rewriters. This could lead to double notifications in case a listener is attached to the builder/rewriter.

As an internal cleanup, `OperationFolder` now has an `IRRewriter` instead of a `RewriterBase::Listener`. In most cases, `OperationFolder` no longer has to notify/deal with listeners. This is done by the rewriter.

Differential Revision: https://reviews.llvm.org/D146134




More information about the All-commits mailing list