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: fwprop fix for PR79405


On February 20, 2017 2:58:54 PM GMT+01:00, Bernd Schmidt <bschmidt@redhat.com> wrote:
>On 02/17/2017 10:11 AM, Richard Biener wrote:
>> Index: gcc/fwprop.c
>> ===================================================================
>> --- gcc/fwprop.c        (revision 245501)
>> +++ gcc/fwprop.c        (working copy)
>> @@ -1478,7 +1478,8 @@ fwprop (void)
>>       Do not forward propagate addresses into loops until after
>unrolling.
>>       CSE did so because it was able to fix its own mess, but we are
>not.  */
>>
>> -  for (i = 0; i < DF_USES_TABLE_SIZE (); i++)
>> +  unsigned sz = DF_USES_TABLE_SIZE ();
>> +  for (i = 0; i < sz; i++)
>>      {
>>        df_ref use = DF_USES_GET (i);
>>        if (use)
>>
>> might work?  (not knowing too much about this detail of the DF data
>> structures - can the table shrink?)
>
>This would probably work to fix the bug, but this behaviour is 
>explicitly documented as intentional (in the comment the second half of
>
>which you've quoted). I assume it enables additional substitutions.

Hmm, this means the walking-stmts solution sounds more correct and also gets these second-level opportunities.

Richard.

>
>Bernd


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