[Mlir-commits] [mlir] [mlir][Transforms] Fix compile time regression in dialect conversion (PR #83023)

Mehdi Amini llvmlistbot at llvm.org
Mon Feb 26 19:46:56 PST 2024


================
@@ -1229,9 +1229,8 @@ LogicalResult ConversionPatternRewriterImpl::remapValues(
 }
 
 bool ConversionPatternRewriterImpl::isOpIgnored(Operation *op) const {
-  // Check to see if this operation was replaced or its parent ignored.
-  return ignoredOps.count(op->getParentOp()) ||
-         hasRewrite<ReplaceOperationRewrite>(rewrites, op);
+  // Check to see if this operation or the parent operation is ignored.
+  return ignoredOps.count(op->getParentOp()) || ignoredOps.count(op);
----------------
joker-eph wrote:

Is the parentOp more likely to be ignored? Otherwise why not check the op first before dereferencing the 2 pointers to get the parent?

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


More information about the Mlir-commits mailing list