[Mlir-commits] [mlir] Allow SymbolUserOpInterface operators to be used in RemoveDeadValues Pass (PR #117405)

Mehdi Amini llvmlistbot at llvm.org
Sat Nov 23 12:28:05 PST 2024


================
@@ -577,10 +577,8 @@ void RemoveDeadValues::runOnOperation() {
   WalkResult acceptableIR = module->walk([&](Operation *op) {
     if (op == module)
       return WalkResult::advance();
-    if (isa<BranchOpInterface>(op) ||
-        (isa<SymbolUserOpInterface>(op) && !isa<CallOpInterface>(op))) {
-      op->emitError() << "cannot optimize an IR with "
-                         "non-call symbol user ops or branch ops\n";
+    if (isa<BranchOpInterface>(op)) {
----------------
joker-eph wrote:

I probably misunderstood  your earlier comment, can you clarify what you were trying to do here:

> If I change the test to have memory effects (i.e memref.store) in the blocks then the test passes, i.e:


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


More information about the Mlir-commits mailing list