This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [CFG] More aggresive constant_iterations


> 
> Changelog:
> 	* loop.h (struct loop_desc): Field init replaced by var_alts,
> 	new field lim_alts.
> 	* unroll-new.c (variable_initial_values): New static function.
> 	(count_loop_iterations): Add arguments for explicit values of
> 	initial and final value.
> 	(simple_condition_p): Use variable_initial_values.
> 	(constant_iterations): More aggressive now.
> 	(simple_loop_exit_p): Use variable_initial_values, dump lim_alts and
> 	var_alts.
> 	(test_for_iteration, unroll_loop_runtime_iterations): Modified.

OK,
Looks correct to me, so I will install it.  In what testcases this
helps?
Is the gain considerable?  Can't we run into very expensive loops (where
we get a lot of alternatives)

Perhaps we can consider base the analysers on the df module, or just
draw somewhere a line of complexity where we don't want to go accross
and declare that rest should be done by loop canonicalization pass
(nonexistent, unforutnately)

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]