[Mlir-commits] [mlir] Bufferization with ControlFlow Asserts (PR #95868)
Matthias Springer
llvmlistbot at llvm.org
Mon Jun 17 23:00:01 PDT 2024
================
@@ -37,7 +37,7 @@ class CF_Op<string mnemonic, list<Trait> traits = []> :
// AssertOp
//===----------------------------------------------------------------------===//
-def AssertOp : CF_Op<"assert"> {
+def AssertOp : CF_Op<"assert", [Pure]> {
----------------
matthias-springer wrote:
I just noticed a problem with this approach. If the op is "pure", it will just fold away. That's why some of the tests are failing. We have to give it some side effect. I'd suggest a "write" effect not attached to any SSA value, with a comment that it models the side effect of "program termination". This can't be done with a trait, you'd have to implement the `MemoryEffectsOpInterface::getEffects`.
https://github.com/llvm/llvm-project/pull/95868
More information about the Mlir-commits
mailing list