[Mlir-commits] [mlir] [mlir][Transform] Relax the applicability of transform.foreach_match … (PR #70209)

Nicolas Vasilache llvmlistbot at llvm.org
Mon Oct 30 04:27:12 PDT 2023


nicolasvasilache wrote:

> What's your use case? Not matching the root is load bearing as the rewrite part can erase it and chaos will ensue when we try to associate the result with the erased operation in line 895 below.

Added a `restrict_root` unit attr like we discussed offline.
It is a pretty common idiom to apply transforms on a func, check some property of the func in the matcher and then apply actions on the func itself, modifying only its content.


https://github.com/llvm/llvm-project/pull/70209


More information about the Mlir-commits mailing list