[patch] for PR 27283

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Mon May 1 20:13:00 GMT 2006


Hello,

> > 	PR tree-optimization/27283
> > 	* tree-ssa-loop-ivopts.c (struct nfe_cache_elt): Store just trees,
> > 	not whole # of iteration descriptions.
> > 	(niter_for_exit): Return just # of iterations.  Fail if # of iterations
> > 	uses abnormal ssa name.
> > 	(niter_for_single_dom_exit): Ditto.
> > 	(find_induction_variables, may_eliminate_iv): Expect niter_for_exit to
> > 	return just the number of iterations.
> 
> This is OK for mainline, provided that you add the test case from the
> bugzilla PR to the testsuite.
> 
> Do you think it'll be possible for niter_at_exit to optimize these types
> of loops at some point in the future?

one way would be better to just get rid of
SSA_NAME_OCCURS_IN_ABNORMAL_PHI.  That would enable some optimization
opportunities throughout the middle-end, at the expense of possibly
making the results of out-of-ssa worse on testcases that use eh heavily,
so it is a bit hard to estimate what the total result would be.
I had the patch once, but never got to testing it properly (basically
because of the lack of a reasonable c++/java benchmark -- this change
would be more or less neutral for c).

Zdenek



More information about the Gcc-patches mailing list