https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116850

--- Comment #4 from Michael Matz <matz at gcc dot gnu.org> ---
> Instead of using post-dominance from entry we could approximate that by
> dominance from exit which requires adding fake exit edges.

Hmm?  post-dominance _is_ dominance from exit.  (IOW: it's dominance on the
reverse CFG).  With the usual caveat that dead-ends need to be handled unlike
the dominance case (hence the fake exit edges).

I haven't yet looked at the problem here in detail, but generally speaking
updating dominators is unboundedly difficult if random new edges are added (as
in: all doms might change hence recomputing all of them can be equivalent).

I don't think we ever did so for any postdom problem and just recompute.
It may very well be that this would be too expensive here in which case we
simply cannot do these transformations iteratively, we instead need to compute
which transformations we want to do, then do all of them, then recompute
postdom,
and then stop.

Reply via email to