[flang-commits] [flang] [mlir] [mlir][CSE] Add pruneDeadOps to CSE pass (PR #193778)
lonely eagle via flang-commits
flang-commits at lists.llvm.org
Thu Apr 30 05:27:29 PDT 2026
================
@@ -294,15 +297,38 @@ LogicalResult CSEDriver::simplifyOperation(ScopedMapTy &knownValues,
return failure();
}
+void CSEDriver::pruneDeadOps(Operation *root, ScopedMapTy &knownValues) {
+ // We use `SetVector` to prevent already inserted ops from being added to the
+ // `worklist` repeatedly, avoiding secondary access to erased operations.
+ llvm::SetVector<Operation *> worklist;
----------------
linuxlonelyeagle wrote:
Got it. However, there seem to be some issues that I'm currently looking into.😂
https://github.com/llvm/llvm-project/pull/193778
More information about the flang-commits
mailing list