Hi, > > I realize you're trying to do the same, but by using the SESE copier, you're > > implicitly trying to do an incremental update. I think you're going to > > really need to look at the assumptions of that code and verify that the > > switch FSA optimization doesn't violate those assumptions. > > Indeed. I'd rather have a flag to the SESE copier that tells it the region > is SEME and in that case make it not update dominators but leave that > to the caller (which means, recompute them). It seems the code already > handles ME regions if the other exits are "not important" (we don't have > to insert/update PHI nodes in those exit blocks), so it may be that there > are even more constraints on those unimportant exits due to the > iterative dominator update - I think that the entry block of the region > needs to dominate all exit destinations, otherwise get_dominated_by_region > is not working correctly. In your case one exit is a back-edge? We should > be able to add checking to the code to verify unimportant edges are > unimportant "enough". > > I'm sure Zdenek knows the limitations best.
as far as I remember, indeed only the single-entry assumption is important (but I do not remember all that much, unfortunately), Zdenek