[Mlir-commits] [mlir] [MLIR] Harmonize the behavior of the folding API functions (PR #88508)
Matthias Springer
llvmlistbot at llvm.org
Mon Apr 22 09:58:35 PDT 2024
================
@@ -476,16 +476,14 @@ Operation *OpBuilder::create(Location loc, StringAttr opName,
return create(state);
}
-/// Attempts to fold the given operation and places new results within
-/// 'results'. Returns success if the operation was folded, failure otherwise.
-/// Note: This function does not erase the operation on a successful fold.
LogicalResult OpBuilder::tryFold(Operation *op,
SmallVectorImpl<Value> &results) {
+ assert(results.empty());
----------------
matthias-springer wrote:
nit: `&& "expected empty results"`
https://github.com/llvm/llvm-project/pull/88508
More information about the Mlir-commits
mailing list