[all-commits] [llvm/llvm-project] 12874e: [mlir][NFC] Add helper for common pattern of repla...

Sean Silva via All-commits all-commits at lists.llvm.org
Thu May 13 12:42:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 12874e93a15219ccfaff42a0536b2b5368c6f304
      https://github.com/llvm/llvm-project/commit/12874e93a15219ccfaff42a0536b2b5368c6f304
  Author: Sean Silva <silvasean at google.com>
  Date:   2021-05-13 (Thu, 13 May 2021)

  Changed paths:
    M mlir/include/mlir/IR/Value.h
    M mlir/lib/Dialect/Affine/Transforms/AffineLoopNormalize.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
    M mlir/lib/IR/Value.cpp

  Log Message:
  -----------
  [mlir][NFC] Add helper for common pattern of replaceAllUsesExcept

This covers the extremely common case of replacing all uses of a Value
with a new op that is itself a user of the original Value.

This should also be a little bit more efficient than the
`SmallPtrSet<Operation *, 1>{op}` idiom that was being used before.

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




More information about the All-commits mailing list