This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] GCSE: Changing PARAM_MAX_GCSE_PASSES to 2.
- From: David Ung <davidu at mips dot com>
- To: Mostafa Hagog <MUSTAFA at il dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 18 Mar 2004 15:15:46 +0000
- Subject: Re: [PATCH] GCSE: Changing PARAM_MAX_GCSE_PASSES to 2.
- Organization: MIPS Technologies UK
- References: <OF3E2636AD.9A2360F3-ONC2256E5B.004B437F-C2256E5B.004C0CF5@il.ibm.com>
On Thu, 2004-03-18 at 13:50, Mostafa Hagog wrote:
> email@example.com 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
> 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);
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.