This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Remove unused var and function
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: Remove unused var and function
- From: Jan Hubicka <jh at suse dot cz>
- Date: Sun, 16 Sep 2001 19:08:41 +0200
- Cc: gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- References: <u8adzv6z6i.fsf@gromit.moeb>
>
> make bootstrap gave warnings about an unused variable and a function.
>
> Honza, do you still need emit_jump_to_block_after?
No, I am removing it in the cfg instruction cleanup patch I am about to commit
tomorrow morning.
Honya
>
> Ok to commit the appended patch? I've bootstrapped/regtested on
> i686-linux.
>
> Andreas
>
> 2001-09-16 Andreas Jaeger <aj@suse.de>
>
> * bb-reorder.c (emit_jump_to_block_after): Removed, it's unused.
>
> * builtins.c (c_getstr): Remove unused variable.
>
> ============================================================
> Index: gcc/bb-reorder.c
> --- gcc/bb-reorder.c 2001/09/11 16:58:56 1.38
> +++ gcc/bb-reorder.c 2001/09/16 13:25:48
> @@ -1,5 +1,5 @@
> /* Basic block reordering routines for the GNU compiler.
> - Copyright (C) 2000 Free Software Foundation, Inc.
> + Copyright (C) 2000, 2001 Free Software Foundation, Inc.
>
> This file is part of GCC.
>
> @@ -180,7 +180,6 @@
> static void make_reorder_chain PARAMS ((void));
> static basic_block make_reorder_chain_1 PARAMS ((basic_block, basic_block));
> static rtx label_for_bb PARAMS ((basic_block));
> -static rtx emit_jump_to_block_after PARAMS ((basic_block, rtx));
> static void fixup_reorder_chain PARAMS ((void));
> static void relate_bbs_with_scopes PARAMS ((scope));
> static scope make_new_scope PARAMS ((int, rtx));
> @@ -515,49 +514,6 @@
>
> return label;
> }
> -
> -
> -/* Emit a jump to BB after insn AFTER. */
> -
> -static rtx
> -emit_jump_to_block_after (bb, after)
> - basic_block bb;
> - rtx after;
> -{
> - rtx jump;
> -
> - if (bb != EXIT_BLOCK_PTR)
> - {
> - rtx label = label_for_bb (bb);
> - jump = emit_jump_insn_after (gen_jump (label), after);
> - JUMP_LABEL (jump) = label;
> - LABEL_NUSES (label) += 1;
> - if (basic_block_for_insn)
> - set_block_for_new_insns (jump, bb);
> -
> - if (rtl_dump_file)
> - fprintf (rtl_dump_file, "Emitting jump to block %d\n",
> - bb->index);
> - }
> - else
> - {
> -#ifdef HAVE_return
> - if (! HAVE_return)
> - abort ();
> - jump = emit_jump_insn_after (gen_return (), after);
> - if (basic_block_for_insn)
> - set_block_for_new_insns (jump, bb);
> -
> - if (rtl_dump_file)
> - fprintf (rtl_dump_file, "Emitting return\n");
> -#else
> - abort ();
> -#endif
> - }
> -
> - return jump;
> -}
> -
>
> /* Given a reorder chain, rearrange the code to match. */
>
> ============================================================
> Index: gcc/builtins.c
> --- gcc/builtins.c 2001/09/11 17:10:15 1.120
> +++ gcc/builtins.c 2001/09/16 13:25:50
> @@ -297,7 +297,6 @@
> tree src;
> {
> tree offset_node;
> - HOST_WIDE_INT offset;
>
> src = string_constant (src, &offset_node);
> if (src == 0)
>
> --
> Andreas Jaeger
> SuSE Labs aj@suse.de
> private aj@arthur.inka.de
> http://www.suse.de/~aj