[llvm-branch-commits] [mlir] [mlir][Transform] `apply_conversion_patterns`: Update handles (PR #83950)
Oleksandr Alex Zinenko via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 5 07:32:26 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);
+ }
----------------
ftynse wrote:
Nit: I don't recall if dialect conversion could rewrite the top-level op or not. If it can, it may need to still consume the handle...
https://github.com/llvm/llvm-project/pull/83950
More information about the llvm-branch-commits
mailing list