[PATCH] D68154: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 07:22:43 PDT 2019


kuhar added a comment.

In D68154#1687316 <https://reviews.llvm.org/D68154#1687316>, @kuhar wrote:

> In D68154#1687315 <https://reviews.llvm.org/D68154#1687315>, @arsenm wrote:
>
> > Is there some reason it’s difficult to update the tree where needed here? I would try to just handle that instead of figuring out how to unpreserve it
>
>
> Will try that, we have a generic updater that we should be able to use.


The issue is that right now MachineDominatorTree has some ad-hoc updater that does (lazy) critical edge splitting before almost any domtree operation. Block splitting uses the old manual API for updating DomTree, and cannot easily be mixed with the new incremental updater.

I think a proper solution here would be to first preserve MDT and MPDT where needed, using the simple recalculation where necessary, then making sure it verifies across machine passes, and later switching to the incremental updater across machine passes instead of the lazy critical edge splitting.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68154/new/

https://reviews.llvm.org/D68154





More information about the llvm-commits mailing list