[Mlir-commits] [mlir] [MLIR] RemoveDeadValues: Allowing IRs with global constants to get dead values removed (PR #116519)

Mehdi Amini llvmlistbot at llvm.org
Wed Nov 20 11:46:51 PST 2024


================
@@ -573,15 +573,13 @@ void RemoveDeadValues::runOnOperation() {
   Operation *module = getOperation();
 
   // The removal of non-live values is performed iff there are no branch ops,
-  // all symbol ops present in the IR are function-like, and all symbol user ops
-  // present in the IR are call-like.
+  // and all symbol user ops present in the IR are call-like.
   WalkResult acceptableIR = module->walk([&](Operation *op) {
     if (op == module)
       return WalkResult::advance();
     if (isa<BranchOpInterface>(op) ||
-        (isa<SymbolOpInterface>(op) && !isa<FunctionOpInterface>(op)) ||
         (isa<SymbolUserOpInterface>(op) && !isa<CallOpInterface>(op))) {
----------------
joker-eph wrote:

This last check is also not clear to me. But I'm not sure if this has all to do with some aspects of the dataflow framework?

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


More information about the Mlir-commits mailing list