[Mlir-commits] [mlir] [mlir] Enable remove-dead-values to delete unused private function (PR #161471)

lonely eagle llvmlistbot at llvm.org
Wed Oct 1 09:06:15 PDT 2025


================
@@ -881,9 +891,12 @@ void RemoveDeadValues::runOnOperation() {
   // end of this pass.
   RDVFinalCleanupList finalCleanupList;
 
+  module->walk([&](FunctionOpInterface op) {
+    processFuncOp(op, module, la, deadVals, finalCleanupList);
+  });
----------------
linuxlonelyeagle wrote:

If FunctionOpInterface is processed in the walk below, even though funcOp has been deleted, the ops within funcOp will still be deleted, causing the program to crash.

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


More information about the Mlir-commits mailing list