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: [PATCH] Fix misc set but not used warnings


On Fri, Nov 27, 2009 at 11:42 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> This patch fixes a couple of set but not used warnings in various places.
> Many more are left, this is just what I've tested so far.
>
> Bootstrapped/regtested on x86_64-linux. ?Ok for trunk?

Ok.

Thanks,
Richard.

> 2009-11-27 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?* config/i386/i386.c (ix86_emit_restore_sse_regs_using_mov): Remove
> ? ? ? ?unused insn variable.
> ? ? ? ?* genemit.c (output_peephole2_scratches): Only declare and initialize
> ? ? ? ?_regs_allocated if it will be ever used.
> ? ? ? ?* cfgloopmanip.c (create_empty_if_region_on_edge): Remove unused
> ? ? ? ?succ_bb variable.
> ? ? ? ?(create_empty_loop_on_edge): Remove unused freq and cnt variables.
> ? ? ? ?* unwind-c.c (PERSONALITY_FUNCTION): Remove unused action_record
> ? ? ? ?variable.
>
> --- gcc/config/i386/i386.c.jj ? 2009-11-26 09:44:43.000000000 +0100
> +++ gcc/config/i386/i386.c ? ? ?2009-11-26 17:36:35.000000000 +0100
> @@ -8844,7 +8844,7 @@ ix86_emit_restore_sse_regs_using_mov (rt
> ?{
> ? int regno;
> ? rtx base_address = gen_rtx_MEM (TImode, pointer);
> - ?rtx mem, insn;
> + ?rtx mem;
>
> ? for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
> ? ? if (SSE_REGNO_P (regno) && ix86_save_reg (regno, maybe_eh_return))
> @@ -8865,7 +8865,7 @@ ix86_emit_restore_sse_regs_using_mov (rt
> ? ? ? ? ?}
> ? ? ? ?mem = adjust_address (base_address, TImode, offset);
> ? ? ? ?set_mem_align (mem, 128);
> - ? ? ? insn = emit_move_insn (reg, mem);
> + ? ? ? emit_move_insn (reg, mem);
> ? ? ? ?offset += 16;
>
> ? ? ? ?ix86_add_cfa_restore_note (NULL_RTX, reg, red_offset);
> --- gcc/genemit.c.jj ? ?2009-02-20 15:34:31.000000000 +0100
> +++ gcc/genemit.c ? ? ? 2009-11-26 17:36:35.000000000 +0100
> @@ -1,6 +1,6 @@
> ?/* Generate code from machine description to emit insns as rtl.
> ? ?Copyright (C) 1987, 1988, 1991, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
> - ? 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
> + ? 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
>
> ?This file is part of GCC.
>
> @@ -782,9 +786,7 @@ output_peephole2_scratches (rtx split)
> ?{
> ? int i;
> ? int insn_nr = 0;
> -
> - ?printf (" ?HARD_REG_SET _regs_allocated;\n");
> - ?printf (" ?CLEAR_HARD_REG_SET (_regs_allocated);\n");
> + ?bool first = true;
>
> ? for (i = 0; i < XVECLEN (split, 0); i++)
> ? ? {
> @@ -803,6 +805,13 @@ output_peephole2_scratches (rtx split)
> ? ? ? ? ? ?else if (GET_CODE (XVECEXP (split, 0, j)) != MATCH_SCRATCH)
> ? ? ? ? ? ? ?cur_insn_nr++;
>
> + ? ? ? ? if (first)
> + ? ? ? ? ? {
> + ? ? ? ? ? ? printf (" ?HARD_REG_SET _regs_allocated;\n");
> + ? ? ? ? ? ? printf (" ?CLEAR_HARD_REG_SET (_regs_allocated);\n");
> + ? ? ? ? ? ? first = false;
> + ? ? ? ? ? }
> +
> ? ? ? ? ?printf (" ?if ((operands[%d] = peep2_find_free_register (%d, %d, \"%s\", %smode, &_regs_allocated)) == NULL_RTX)\n\
> ? ? return NULL;\n",
> ? ? ? ? ? ? ? ? ?XINT (elt, 0),
> --- gcc/cfgloopmanip.c.jj ? ? ? 2009-11-25 16:47:35.000000000 +0100
> +++ gcc/cfgloopmanip.c ?2009-11-26 17:36:35.000000000 +0100
> @@ -541,13 +541,12 @@ edge
> ?create_empty_if_region_on_edge (edge entry_edge, tree condition)
> ?{
>
> - ?basic_block succ_bb, cond_bb, true_bb, false_bb, join_bb;
> + ?basic_block cond_bb, true_bb, false_bb, join_bb;
> ? edge e_true, e_false, exit_edge;
> ? gimple cond_stmt;
> ? tree simple_cond;
> ? gimple_stmt_iterator gsi;
>
> - ?succ_bb = entry_edge->dest;
> ? cond_bb = split_edge (entry_edge);
>
> ? /* Insert condition in cond_bb. ?*/
> @@ -628,8 +627,6 @@ create_empty_loop_on_edge (edge entry_ed
> ?{
> ? basic_block loop_header, loop_latch, succ_bb, pred_bb;
> ? struct loop *loop;
> - ?int freq;
> - ?gcov_type cnt;
> ? gimple_stmt_iterator gsi;
> ? gimple_seq stmts;
> ? gimple cond_expr;
> @@ -659,9 +656,6 @@ create_empty_loop_on_edge (edge entry_ed
> ? add_loop (loop, outer);
>
> ? /* TODO: Fix frequencies and counts. ?*/
> - ?freq = EDGE_FREQUENCY (entry_edge);
> - ?cnt = entry_edge->count;
> -
> ? prob = REG_BR_PROB_BASE / 2;
>
> ? scale_loop_frequencies (loop, REG_BR_PROB_BASE - prob, REG_BR_PROB_BASE);
> --- gcc/unwind-c.c.jj ? 2009-10-15 22:07:37.000000000 +0200
> +++ gcc/unwind-c.c ? ? ?2009-11-26 17:36:35.000000000 +0100
> @@ -120,7 +120,7 @@ PERSONALITY_FUNCTION (int version,
> ?#endif
> ?{
> ? lsda_header_info info;
> - ?const unsigned char *language_specific_data, *p, *action_record;
> + ?const unsigned char *language_specific_data, *p;
> ? _Unwind_Ptr landing_pad, ip;
> ? int ip_before_insn = 0;
>
> @@ -181,8 +181,6 @@ PERSONALITY_FUNCTION (int version,
> ? ? ? /* Can never have null landing pad for sjlj -- that would have
> ? ? ? ? been indicated by a -1 call site index. ?*/
> ? ? ? landing_pad = (_Unwind_Ptr)cs_lp + 1;
> - ? ? ?if (cs_action)
> - ? ? ? action_record = info.action_table + cs_action - 1;
> ? ? ? goto found_something;
> ? ? }
> ?#else
> @@ -205,8 +203,6 @@ PERSONALITY_FUNCTION (int version,
> ? ? ? ?{
> ? ? ? ? ?if (cs_lp)
> ? ? ? ? ? ?landing_pad = info.LPStart + cs_lp;
> - ? ? ? ? if (cs_action)
> - ? ? ? ? ? action_record = info.action_table + cs_action - 1;
> ? ? ? ? ?goto found_something;
> ? ? ? ?}
> ? ? }
>
> ? ? ? ?Jakub
>


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