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:
> +++ gcc-new/gcc/genattrtab.c	Fri Sep  6 13:03:10 2002
> @@ -2562,11 +2562,10 @@ simplify_cond (exp, insn_code, insn_inde
>    int len = XVECLEN (exp, 0);
>    rtx *tests = (rtx *) xmalloc (len * sizeof (rtx));
>    int allsame = 1;
> -  char *first_spacer;
>    rtx ret;
>  
>    /* This lets us free all storage allocated below, if appropriate.  */
> -  first_spacer = (char *) obstack_finish (rtl_obstack);
> +  obstack_finish (rtl_obstack);

Ok, I've looked at this further.  All references to obstacks
in genattrtab.c are now garbage and can be removed.

> +++ gcc-new/gcc/jump.c	Fri Sep  6 13:57:28 2002
> @@ -78,10 +78,8 @@ rebuild_jump_labels (f)
>       rtx f;
>  {
>    rtx insn;
> -  int max_uid = 0;
> -
> -  max_uid = init_label_info (f) + 1;
>  
> +  init_label_info (f);

Incidentally, this now means that init_label_info can return void,
and thus the collection of largest_uid in that function is garbage.

> +++ gcc-new/gcc/loop.c	Fri Sep  6 14:11:42 2002
> @@ -5915,10 +5905,7 @@ check_final_value (loop, v)
>       struct induction *v;
>  {
>    struct loop_ivs *ivs = LOOP_IVS (loop);
> -  struct iv_class *bl;
>    rtx final_value = 0;
> -
> -  bl = REG_IV_CLASS (ivs, REGNO (v->src_reg));

ivs is now garbage too.


> @@ -819,9 +817,6 @@ process_note_predictions (bb, heads, dom
>  	  delete_insn (insn);
>  	}
>      }
> -  for (e = bb->succ; e; e = e->succ_next)
> -    if (!(e->flags & EDGE_FAKE))
> -      noreturn_block = 0;
>    if (contained_noreturn_call)

This one looks like a legitimate error.  That IF should
be testing noreturn_block not contained_noreturn_call.

> @@ -2595,10 +2594,8 @@ want_to_remat (x)
>    SET_SRC (PATTERN (remat_test_insn)) = x;
>    /* XXX For now we don't allow any clobbers to be added, not just no
>       hardreg clobbers.  */
> -  return ((icode = recog (PATTERN (remat_test_insn), remat_test_insn,
> -			  &num_clobbers)) >= 0
> -	  && (num_clobbers == 0
> -	      /*|| ! added_clobbers_hard_reg_p (icode)*/));
> +  return (recog (PATTERN (remat_test_insn), remat_test_insn, &num_clobbers) >= 0
> +	   && num_clobbers == 0);
>  }

This one looks like it should be left alone for the time being.
If you like, to remove the warning from your radar, rearrange as

  icode = recog (PATTERN (remat_test_insn), remat_test_insn, &num_clobbers);
  return (icode >= 0 && ...)

I've committed everything except these last two hunks.


r~


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