[flang-commits] [flang] [mlir] [MLIR] Refactor DCE helper to expose worklist entry-point, and use this helper in CSE (PR #195636)

Hocky Yudhiono via flang-commits flang-commits at lists.llvm.org
Tue May 5 01:41:38 PDT 2026


hockyy wrote:

> The whole logic propagating the trivially dead ops in the parent worklist is not straightforward, and none of this enables any use-case on top of running trivial-dce in the first place.

I agree at this point. The `eliminateTriviallyDeadOps` inside this CSE is just a little-bit-faster DCE heuristic. 

It's possible to for us **to not do DCE** at all for CSE, and let developers manually run DCE or canonicalization.

But If I were to keep the dead ops prune, I prefer this one compared to the older one.

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


More information about the flang-commits mailing list