[patch] Make niter analysis return COND_EXPRs

Richard Guenther rguenther@suse.de
Thu May 27 10:17:00 GMT 2010


On Wed, 26 May 2010, Sebastian Pop wrote:

> On Wed, May 26, 2010 at 04:28, Richard Guenther <rguenther@suse.de> wrote:
> > This is not ok.  The function now will return different answers
> > if you call it multiple times.
> 
> Right!  Thanks for catching that.  Ok with this change?
> I am regstrapping this again with BOOT_CFLAGS="-g -O3 -msse2".

Well, this removes the caching completely and thus invalidates

  /* The number of times the latch of the loop is executed.
     This is an INTEGER_CST or an expression containing symbolic
     names.  Don't access this field directly:
     number_of_latch_executions computes and caches the computed
     information in this field.  */
  tree nb_iterations;

why not simply set nb_iterations to the COND_EXPR (also adjusting
the above comment to mention that special-case even though it's
within "an expression ...").

Thanks,
Richard.


More information about the Gcc-patches mailing list