This is the mail archive of the 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: ifcvt/crossjump patch: Fix PR 42496, 21803

On 07/27/2010 11:21 AM, Bernd Schmidt wrote:
> On 07/27/2010 09:44 AM, Eric Botcazou wrote:
>> In particular, I want to avoid kludges like:
>> +/* Set to true if we couldn't run an optimization due to stale liveness
>> +   information; we should run df_analyze to enable more opportunities.  */
>> +static bool block_was_dirty;
>> @@ -2182,6 +2449,9 @@ try_optimize_cfg (int mode)
>>  	      && try_crossjump_bb (mode, EXIT_BLOCK_PTR))
>>  	    changed = true;
>> +	  if (block_was_dirty)
>> +	    df_analyze ();
>> +
>>  	  if (changed)
>>  	    verify_flow_info ();
>> that shouldn't be necessary.
> Still not an argument.  Why shouldn't it be necessary?  It is logical
> that by moving code, we change the liveness of registers.  We have to
> verify the liveness of registers before moving code, hence, to iterate,
> we have to recompute it.

BTW, this is essentially the same thing that's done in the main loop in
ifcvt.c (do you also see it as a kludge there?), where I originally
implemented this optimization, and you were the one who suggested I move
it to cfgcleanup.c.  Maybe you misunderstood the optimization back then
and thought it was just CFG manipulation?  That's simply not the case;
the analogy with crossjumping doesn't entirely hold.

Please explain what you are thinking.  If you have a clever way to do
it, show it.  If you have just not thought it through sufficiently,
please do not continue to hold up a useful improvement.


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