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: [PATCH] GCSE: Changing PARAM_MAX_GCSE_PASSES to 2.


On Thu, 2004-03-18 at 13:50, Mostafa Hagog wrote:
> gcc-patches-owner@gcc.gnu.org wrote on 12/03/2004 17:00:09:
> 
> > Hi.
> >
> > I think changing the max number of gcse passes to be greater than one
> > may be beneficial.  Consider this little example:
> >
> 
> Theoretically this is correct but it is always a trade-off between compile
> time and performance gain. To support this observation; while working on
> gcse-las optimization, setting the gcse maximum passes to 3 show
> improvements
> in spec.

yes, you are right that there's always a trade-off.  

But the existence of changed in the main loop suggests that somehow a
decision can be made if an extra pass may benefit:

while (changed && pass < MAX_GCSE_PASSES)
	..
	changed |= one_pre_gcse_pass (pass + 1);

to 

while (no_changes / no_insn_in_block (bb) > GCSE_BENEFIT
	 && pass < MAX_GCSE_PASSES)
	
	..
	no_changes = one_pre_gcse_pass (pass + 1);

or something similar to hint whether it is worth while for another pass.

David.


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