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

--- Comment #12 from Andrew Macleod <amacleod at redhat dot com> ---
Yes, ranger can currently create some very deep call chains, especially as it
evaluates values around back edges.

A general query on a stmt first checks if all the operands have been resolved,
and if they have not been, spawns another query to resolve the answer.  If we
do this along a back edge, we get into another basic block which has not been
processed at all, so every operand spawns another request and the stack gets
deeper and deeper until it reaches a stmt that can be resolved.. then it
unwinds with all the answers, folding and setting ranges as it goes.

Note that each one of the query steps can involves 4 or 5 functions calls as we
look at the kind of stmt, and process it, then get values on edges, etc etc. 
so each "depth" of query can be up to 5 function calls.

I have analyzed the call patterns and have a solution I am working on now that 
almost completely flattens the call chains to satisfy the dependency
resolution.

Reply via email to