[all-commits] [llvm/llvm-project] 07fef1: [mlir][transform] Better debugging facilites for i...

Matthias Springer via All-commits all-commits at lists.llvm.org
Tue Apr 11 23:49:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07fef178e8b0320dcfeaaef26b5a93eb7dfbf833
      https://github.com/llvm/llvm-project/commit/07fef178e8b0320dcfeaaef26b5a93eb7dfbf833
  Author: Matthias Springer <springerm at google.com>
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    M mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
    M mlir/lib/Dialect/Transform/IR/TransformOps.cpp
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td

  Log Message:
  -----------
  [mlir][transform] Better debugging facilites for invalid API usage

This revision adds additional "expensive-checks" checks to the transform dialect that detect the most common cases of:

* Missing `consumesHandle` side effects on transform ops.
* Patterns that remove operations but do not notify the transform dialect.

In essence, these additional checks are looking for dangling pointers to erased payload ops in the transform dialect state and crash the program execution (by dereferencing free'd memory) or triggering an assertion failure. It is recommended to run these extra checks with ASAN. Otherwise, certain failures may not be detected. The ASAN error message can also be used to find the faulty transform op/pattern.

This change also fixes a few faulty transform ops.

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




More information about the All-commits mailing list