[Mlir-commits] [mlir] [mlir][Transform] `apply_conversion_patterns`: Update handles (PR #83950)

Matthias Springer llvmlistbot at llvm.org
Thu Mar 7 17:37:17 PST 2024


================
@@ -632,7 +663,11 @@ LogicalResult transform::ApplyConversionPatternsOp::verify() {
 
 void transform::ApplyConversionPatternsOp::getEffects(
     SmallVectorImpl<MemoryEffects::EffectInstance> &effects) {
-  transform::consumesHandle(getTarget(), effects);
+  if (!getPreserveHandles()) {
+    transform::consumesHandle(getTarget(), effects);
+  } else {
+    transform::onlyReadsHandle(getTarget(), effects);
+  }
----------------
matthias-springer wrote:

Does it actually matter? If the top-level op is rewritten, it will be done through the rewriter, so the transform dialect state will be updated accordingly. (Same as for non-top-level ops.)

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


More information about the Mlir-commits mailing list