------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz 2005-01-25 15:54 ------- 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? because this answer preserves loop closed ssa form -- the answer x_1 + 1 copy propagates the value outsied of the loop. In some applications this choice could make sense. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18595