[Bug tree-optimization/18595] [4.0 Regression] IV-OPTS is O(N^3)
sebastian dot pop at cri dot ensmp dot fr
gcc-bugzilla@gcc.gnu.org
Tue Jan 25 12:44:00 GMT 2005
------- Additional Comments From sebastian dot pop at cri dot ensmp dot fr 2005-01-25 12:44 -------
Subject: Re: [4.0 Regression] IV-OPTS is O(N^3)
rakdver at atrey dot karlin dot mff dot cuni dot cz wrote:
> More seriously -- which of the possibilities? If I have loops like
>
> while (...)
> {
> while (...)
> {
> x_1 = something ();
> }
> x_2 = phi (x_1);
> x_3 = x_2 + 1;
> }
>
> What will analyze_scalar_evolutions return for x_3? There are (at least)
> three possible valid values:
>
> x_3
This would be the answer if analyze_scalar_evolutions would be the
identity function. If you want, you could change analyze_scalar_evolutions
such that it behaves like that, and decide that the instantiation do
the rest of the work (I mean moving the code that is currently in
analyze_scalar_evolutions to the instantiation phase).
> x_2 + 1
If you decide to reconstruct the tree expression, there is no reason
to stop on a phi node that has a single argument. Why would you like
to get this answer as the reconstructed tree?
> x_1 + 1
>
IMO this would be the answer, although I didn't checked.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18595
More information about the Gcc-bugs
mailing list