[all-commits] [llvm/llvm-project] 1d9a11: [mlir] harden expensive-checks mode against ops wi...

ftynse via All-commits all-commits at lists.llvm.org
Tue May 30 00:53:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d9a1139fd2c29189f2e2b9b149dfbd1a6b931bb
      https://github.com/llvm/llvm-project/commit/1d9a1139fd2c29189f2e2b9b149dfbd1a6b931bb
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2023-05-30 (Tue, 30 May 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
    M mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
    M mlir/test/Dialect/Transform/expensive-checks.mlir
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
    M mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td

  Log Message:
  -----------
  [mlir] harden expensive-checks mode against ops with repeated operands

Transform operations may indicate that they may accept and consume
several handles pointing to the same or nested payload entities. The
initial implementation of the expensive-checks mode was simply ignoring
such cases as consuming the second handle would fail the check after the
first handle invalidated it by consuming the same payload. Additional
checks had been added since then, which could now trigger assertions in
the expensive-checks module itself (instead of or in addition to
use-after-free assertions down the road), specifically because the
payload associations for invalidated handles is removed from the state
to enable other kinds of checking.

Rework the handling of transform operations with repeated handles so
use-after-consume is still reported properly if the consumption happened
by a preceding operation, as opposed to the a preceding operand of the
same operation that is still (corretly) ignored if the op requests that.

Depends on: D151560

Reviewed By: springerm

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




More information about the All-commits mailing list