[Mlir-commits] [mlir] [MLIR][Transform][SMT] Allow for declarative computations in schedules (PR #160895)
Rolf Morel
llvmlistbot at llvm.org
Thu Oct 9 06:38:52 PDT 2025
================
@@ -37,19 +38,111 @@ transform::smt::ConstrainParamsOp::apply(transform::TransformRewriter &rewriter,
// and allow for users to attach their own implementation, which would,
// e.g., translate the ops to SMTLIB and hand that over to the user's
// favourite solver. This requires changes to the dialect's verifier.
- return emitDefiniteFailure() << "op does not have interpreted semantics yet";
+ return emitSilenceableFailure(getLoc())
+ << "op does not have interpreted semantics yet";
}
LogicalResult transform::smt::ConstrainParamsOp::verify() {
+ auto yieldTerminator =
+ llvm::dyn_cast_if_present<mlir::smt::YieldOp>(getRegion().front().back());
+ if (!yieldTerminator)
+ return emitOpError() << "expected '"
+ << mlir::smt::YieldOp::getOperationName()
+ << "' as terminator";
----------------
rolfmorel wrote:
In the `.cpp.inc` the op's `verifyInvariants()` checks types on operands and results and the only thing it does for the region is:
```c++
static ::llvm::LogicalResult __mlir_ods_local_region_constraint_SMTExtensionOps1(
::mlir::Operation *op, ::mlir::Region ®ion, ::llvm::StringRef regionName,
unsigned regionIndex) {
if (!((::llvm::hasNItems(region, 1)))) {
return op->emitOpError("region #") << regionIndex
<< (regionName.empty() ? " " : " ('" + regionName + "') ")
<< "failed to verify constraint: region with 1 blocks";
}
return ::mlir::success();
}
```
https://github.com/llvm/llvm-project/pull/160895
More information about the Mlir-commits
mailing list