Skip to content
Commit 726d0767 authored by Matthias Springer's avatar Matthias Springer
Browse files

[mlir][transform] ApplyPatternsOp: Add check to prevent modifying the transform IR

Add an extra check to make sure that transform IR is not getting modified by this op while it is being interpreted. This generally dangerous and we may want to enforce this for all transform ops that modify the payload in the future.

Users should generally try to apply patterns only to the piece of IR where it is needed (e.g., a matched function) and not the entire module (which may contain the transform IR).

This revision is in response to a crash in a downstream compiler that was caused by a dead `transform.structured.match` op that was removed by the GreedyPatternRewriteDriver's DCE while the enclosing sequence was being interpreted.

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