[RFC] Replace some bitmaps with HARD_REG_SETs - second version

Steven Bosscher stevenb.gcc@gmail.com
Mon Jul 25 17:57:00 GMT 2011


On Mon, Jul 25, 2011 at 4:20 PM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Mon, 25 Jul 2011, Dimitrios Apostolou wrote:
>
>> Bug found, in df_mark_reg I need to iterate until regno + n, not n. The error
>> is at the following hunk:
>>
>> --- gcc/df-scan.c       2011-02-02 20:08:06 +0000
>> +++ gcc/df-scan.c       2011-07-24 17:16:46 +0000
>> @@ -3713,35 +3717,40 @@ df_mark_reg (rtx reg, void *vset)
>>    if (regno < FIRST_PSEUDO_REGISTER)
>>      {
>>        int n = hard_regno_nregs[regno][GET_MODE (reg)];
>> -      bitmap_set_range (set, regno, n);
>> +      int i;
>> +      for (i=regno; i<n; i++)
>> +       SET_HARD_REG_BIT (*set, i);
>>      }
>
> No.  n is a count, hence the upper bound is regno + n.

Indeed. Which is what Jimis said. Note the "error is in this hunk" ;-)

Ciao!
Steven



More information about the Gcc-patches mailing list