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: [Patches] Code cleanup - remove unused variables - part 2


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~


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