[all-commits] [llvm/llvm-project] 253afd: [mlir][Interfaces] Symbols are not trivially dead

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Jun 15 02:21:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 253afd03f1ffb9574109e36238b0854a214609c9
      https://github.com/llvm/llvm-project/commit/253afd03f1ffb9574109e36238b0854a214609c9
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-06-15 (Thu, 15 Jun 2023)

  Changed paths:
    M mlir/include/mlir/Interfaces/SideEffectInterfaces.h
    M mlir/lib/Interfaces/SideEffectInterfaces.cpp
    M mlir/test/IR/greedy-pattern-rewriter-driver.mlir
    M mlir/test/Transforms/test-operation-folder-commutative.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/lib/Dialect/Test/TestPatterns.cpp

  Log Message:
  -----------
  [mlir][Interfaces] Symbols are not trivially dead

The greedy pattern rewrite driver removes ops that are "trivially dead". This could include symbols that are still referenced by other ops. Dead symbols should be removed with the `-symbol-dce` pass instead.

This bug was not triggered for `func::FuncOp`, because ops are not considered "trivally dead" if they do not implement the `MemoryEffectOpInterface`, indicating that the op may or may not have side effects. It is, however, triggered for `transform::NamedSequenceOp`, which implements that interface because it is required for all transform dialect ops.

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




More information about the All-commits mailing list