[Patches] Code cleanup - remove unused variables - part 2

Richard Henderson rth@redhat.com
Wed Sep 11 09:35:00 GMT 2002


On Wed, Sep 11, 2002 at 06:09:23PM +0200, Reichelt wrote:
>    /* This lets us free all storage allocated below, if appropriate.  */
> -  first_spacer = (char *) obstack_finish (rtl_obstack);
> +  obstack_finish (rtl_obstack);

This one would, ad first blush, appear to be a bug
that it isn't used later.

> @@ -1365,15 +1365,9 @@ record_conflicts (allocno_vec, len)
>       int *allocno_vec;
>       int len;
>  {
> -  int num;
> -  int ialloc_prod;
> -
>    while (--len >= 0)
> -    {
> -      num = allocno_vec[len];
> -      ialloc_prod = num * allocno_row_words;
> -      IOR_HARD_REG_SET (allocno[num].hard_reg_conflicts, hard_regs_live);
> -    }
> +    IOR_HARD_REG_SET (allocno[allocno_vec[len]].hard_reg_conflicts,
> +                      hard_regs_live);

This is also incorrect.  We need to sum across the entire array.
Presumably you only wanted to remove ialloc_prod?

I'll look at the rest later.


r~



More information about the Gcc-patches mailing list