[mlir] reallow null results in TransformEachOpTrait
authorAlex Zinenko <zinenko@google.com>
Mon, 13 Feb 2023 12:32:07 +0000 (12:32 +0000)
committerAlex Zinenko <zinenko@google.com>
Tue, 14 Feb 2023 10:11:32 +0000 (10:11 +0000)
commit7fdc2ed09f441e7e0ca5c88d947e99f259291963
treea001067a32b16a903b7ce5864ea237ad830b9515
parent64dad4ba9af603330458a7673e39a873afdf3d4d
[mlir] reallow null results in TransformEachOpTrait

Previous changes in 98acd7468307b6099e7deae206a749af324ff95f were overly
eager to disallow null payload everywhere. The semantics of
TransformEachOpTrait allows individual applications to return null
payloads as means of filtering out the operations to which they are not
applicable without emitting even a silenceable failure. This is a
questionable choice, but one apparently relied upon. Null payloads are
not supposed to leak outside of the trait.

Reviewed By: qcolombet

Differential Revision: https://reviews.llvm.org/D143904
mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
mlir/test/Dialect/Transform/test-interpreter.mlir
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td