[Mlir-commits] [flang] [mlir] [mlir][CSE] Introduce hoist-pure-ops logic to CSE pass (PR #180556)
lonely eagle
llvmlistbot at llvm.org
Mon Apr 13 03:49:48 PDT 2026
linuxlonelyeagle wrote:
> > This means that although I am hoisting operations here, it does not fundamentally change the relative positioning of blocks within the region. Therefore, DominanceInfo and PostDominanceInfo remain valid.
>
> Contrary to LLVM, we do have regions: when we CSE an operation with regions it means we're deleting blocks. Are we deleting the entry for these regions in the analysis cache?
In DominanceInfoBase, a DenseMap is used to store the dominator tree for each region. I think we should also remove the stale cache from this map when a region-carrying operation is deleted. We could explicitly add a method to DominanceInfoBase to erase a region's dominator tree; otherwise, the memory occupied by these trees won't be released until DominanceInfo itself is destroyed.
https://github.com/llvm/llvm-project/pull/180556
More information about the Mlir-commits
mailing list