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

M. Zeeshan Siddiqui llvmlistbot at llvm.org
Fri Nov 22 17:08:43 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)) {
----------------
codemzs wrote:

@joker-eph I am not sufficiently familiar with the pass to be sure but I am confused myself because the pass seems to work on `BranchOps` and even has tests that check for this condition and error message, however I believe it does so if the IR does not have  "any non-function symbol ops, non-call symbol user ops and branch ops.". 

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


More information about the Mlir-commits mailing list