[all-commits] [llvm/llvm-project] a360a9: Fix deletion of operations through the rewriter in...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Tue Mar 30 15:03:09 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a360a9786f5f82f4beff6fdcec12b40ee392db7a
      https://github.com/llvm/llvm-project/commit/a360a9786f5f82f4beff6fdcec12b40ee392db7a
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2021-03-30 (Tue, 30 Mar 2021)

  Changed paths:
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/Transforms/Utils/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/lib/Dialect/Test/TestPatterns.cpp

  Log Message:
  -----------
  Fix deletion of operations through the rewriter in a pattern matching a consumer operation

This allows for the conversion to match `A(B()) -> C()` with a pattern matching
`A` and marking `B` for deletion.

Also add better assertions when an operation is erased while still having uses.

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




More information about the All-commits mailing list