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

--- Comment #1 from Andrew Macleod <amacleod at redhat dot com> ---

> it looks like range_from_dom walks up immediate dominators but in that loop
> recurses to itself!?  isn't that quadratic?  shouldn't the recursion stop
> at the next immediate dominator of the recursion invoker?

it walks immediate dominators, and when it finds a block with multiple incoming
edges, the recursion call is to calculate the immediate dominators range. When
that recursive call finishes, the walk stops because the immediate dominator
has now been resolved.

So it should be linear.. a mix of walking immediate dominators and resolving
immediate dominators.  but its still a march up the immediate dominator chain.

I suspect its just such a deep list of unresolved dominators to walk that the
recursion is problematic.  I will investigate to verify and see if I can
integrate the recursion with the existing walk stack

Reply via email to