public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH]: set but not used, part 4
@ 2009-11-28  8:46 d binderman
  2009-11-28  9:48 ` Paolo Carlini
  0 siblings, 1 reply; 2+ messages in thread
From: d binderman @ 2009-11-28  8:46 UTC (permalink / raw)
  To: paolo.carlini; +Cc: jakub, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]



Hello there,

I just had a look at the source code of gcc version 4.5 snapshot 20091126
and here is part 4 of removing some set but not used local variables.

The changes seemed to bootstrap and test ok to me.

2009-11-27  David Binderman <dcb314@hotmail.com>

        * gcc/ira-color.c (put_allocno_into_bucket): Remove set but not used
        local variable hard_regs_num.
        * gcc/ira-lives.c (process_single_reg_class_operands): Remove cover_class.
        * gcc/loop-unswitch.c (unswitch_loop): Remove zero_bitmap.
        * gcc/lower-subreg.c (decompose_multiword_subregs): Remove next.


Regards

David Binderman

 		 	   		  
_________________________________________________________________
Add your Gmail and Yahoo! Mail email accounts into Hotmail - it's easy
http://clk.atdmt.com/UKM/go/186394592/direct/01/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bug102.patch --]
[-- Type: text/x-patch, Size: 2033 bytes --]

--- gcc/ira-color.c.sav	2009-11-27 20:02:35.000000000 +0000
+++ gcc/ira-color.c	2009-11-27 20:02:52.000000000 +0000
@@ -1476,11 +1476,9 @@
 static void
 put_allocno_into_bucket (ira_allocno_t allocno)
 {
-  int hard_regs_num;
   enum reg_class cover_class;
 
   cover_class = ALLOCNO_COVER_CLASS (allocno);
-  hard_regs_num = ira_class_hard_regs_num[cover_class];
   if (ALLOCNO_FIRST_COALESCED_ALLOCNO (allocno) != allocno)
     return;
   ALLOCNO_IN_GRAPH_P (allocno) = true;
--- gcc/ira-lives.c.sav	2009-11-27 20:05:42.000000000 +0000
+++ gcc/ira-lives.c	2009-11-27 20:15:08.000000000 +0000
@@ -804,7 +804,7 @@
 {
   int i, regno, cost;
   unsigned int px;
-  enum reg_class cl, cover_class;
+  enum reg_class cl;
   rtx operand;
   ira_allocno_t operand_a, a;
 
@@ -861,7 +861,6 @@
       EXECUTE_IF_SET_IN_SPARSESET (allocnos_live, px)
         {
 	  a = ira_allocnos[px];
-	  cover_class = ALLOCNO_COVER_CLASS (a);
 	  if (a != operand_a)
 	    {
 	      /* We could increase costs of A instead of making it
--- gcc/loop-unswitch.c.sav	2009-11-27 20:06:58.000000000 +0000
+++ gcc/loop-unswitch.c	2009-11-27 20:09:10.000000000 +0000
@@ -392,7 +392,6 @@
   edge entry, latch_edge, true_edge, false_edge, e;
   basic_block switch_bb, unswitch_on_alt;
   struct loop *nloop;
-  sbitmap zero_bitmap;
   int irred_flag, prob;
   rtx seq;
 
@@ -409,7 +408,6 @@
   /* Make a copy.  */
   irred_flag = entry->flags & EDGE_IRREDUCIBLE_LOOP;
   entry->flags &= ~EDGE_IRREDUCIBLE_LOOP;
-  zero_bitmap = sbitmap_alloc (2);
   if (!duplicate_loop_to_header_edge (loop, entry, 1,
 			      	      NULL, NULL, NULL, 0))
     return NULL;
--- gcc/lower-subreg.c.sav	2009-11-27 20:09:37.000000000 +0000
+++ gcc/lower-subreg.c	2009-11-27 20:17:01.000000000 +0000
@@ -1174,13 +1174,11 @@
 
 	  FOR_BB_INSNS (bb, insn)
 	    {
-	      rtx next, pat;
+	      rtx pat;
 
 	      if (!INSN_P (insn))
 		continue;
 
-	      next = NEXT_INSN (insn);
-
 	      pat = PATTERN (insn);
 	      if (GET_CODE (pat) == CLOBBER)
 		resolve_clobber (pat, insn);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]: set but not used, part 4
  2009-11-28  8:46 [PATCH]: set but not used, part 4 d binderman
@ 2009-11-28  9:48 ` Paolo Carlini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Carlini @ 2009-11-28  9:48 UTC (permalink / raw)
  To: d binderman; +Cc: jakub, gcc-patches

On 11/28/2009 09:39 AM, d binderman wrote:
> 2009-11-28  David Binderman <dcb314@hotmail.com>
>
>         * ira-color.c (put_allocno_into_bucket): Remove set but not used
>         local variable hard_regs_num.
>         * ira-lives.c (process_single_reg_class_operands): Remove cover_class.
>         * loop-unswitch.c (unswitch_loop): Remove zero_bitmap.
>         * lower-subreg.c (decompose_multiword_subregs): Remove next.
>   
All, David, I'm bootstrapping and committing the patch as trivial this
time, seems obvious enough to me.

Afterwards, David, please coordinate with Jakub and, well, as I told you
already some time ago, at some point you should start the paperwork for
the Copyright assignment...

Thanks,
Paolo.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-28  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-28  8:46 [PATCH]: set but not used, part 4 d binderman
2009-11-28  9:48 ` Paolo Carlini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).