[all-commits] [llvm/llvm-project] 73c3df: [mlir] Use-after-free checker for the Transform di...

ftynse via All-commits all-commits at lists.llvm.org
Thu May 26 03:28:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 73c3dff1b3e42c278f4c675418b0cb5e8784174b
      https://github.com/llvm/llvm-project/commit/73c3dff1b3e42c278f4c675418b0cb5e8784174b
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2022-05-26 (Thu, 26 May 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Transform/CMakeLists.txt
    M mlir/include/mlir/Dialect/Transform/IR/TransformOps.h
    M mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
    A mlir/include/mlir/Dialect/Transform/Transforms/CMakeLists.txt
    A mlir/include/mlir/Dialect/Transform/Transforms/Passes.h
    A mlir/include/mlir/Dialect/Transform/Transforms/Passes.td
    M mlir/include/mlir/InitAllPasses.h
    M mlir/lib/Dialect/Transform/CMakeLists.txt
    M mlir/lib/Dialect/Transform/IR/TransformOps.cpp
    A mlir/lib/Dialect/Transform/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Transform/Transforms/CheckUses.cpp
    A mlir/test/Dialect/Transform/check-use-after-free.mlir
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir] Use-after-free checker for the Transform dialect

The Transform dialect uses the side effect modeling mechanism to record the
effects of the transform ops on the mapping between Transform IR values and
Payload IR ops. Introduce a checker pass that warns if a Transform IR value is
used after it has been freed (consumed). This pass is mostly intended as a
debugging aid in addition to the verification/assertion mechanisms in the
transform interpreter. It reports all potential use-after-free situations.
The implementation makes a series of simplifying assumptions to be simple and
conservative. A more advanced implementation would rely on the data flow-like
analysis associated with a side-effect resource rather than a value, which is
currently not supported by the analysis infrastructure.

Reviewed By: springerm

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




More information about the All-commits mailing list