[Mlir-commits] [mlir] [MLIR] Handle materializeConstant failure in GreedyPatternRewriteDriver (PR #77258)

Matthias Springer llvmlistbot at llvm.org
Mon Jan 8 05:43:47 PST 2024


================
@@ -462,18 +463,38 @@ bool GreedyPatternRewriteDriver::processWorklist() {
           // Materialize Attributes as SSA values.
           Operation *constOp = op->getDialect()->materializeConstant(
               *this, ofr.get<Attribute>(), resultType, op->getLoc());
----------------
matthias-springer wrote:

Actually, you are erasing the ops with `eraseOp(op);`, which will send a `notifyOperationRemoved`. So it should be fine.

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


More information about the Mlir-commits mailing list