Skip to content
Commit 95f495c7 authored by Alex Zinenko's avatar Alex Zinenko
Browse files

[mlir][transform] add a check for nested consumption in ApplyEachOpTrait

ApplyEachOpTrait applies to payload ops associated with its operand
handle one-by-one in order. If a handle is consumed, this usually
indicates that the associated payload ops are erased or rewritten. Add a
check that we don't consume an ancestor payload operation before
consuming its descendant, as the latter is likely to be a dangling
pointer. Transform operations for which this is a legitimate behavior
(i.e., they consume the handle but don't actually erase or rewrite the
payload operation) should implement the interface directly and allow for
repeated handles.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D152510
parent 95bfb190
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment