OSDN Git Service

2006-09-11 Alexandre Oliva <aoliva@redhat.com>
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Sep 2006 21:30:07 +0000 (21:30 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Sep 2006 21:30:07 +0000 (21:30 +0000)
PR target/28672
* var-tracking.c (dump_dataflow_set): Start dumping at
register zero.
(clobber_variable_part): Kill only the variable part in
registers holding it, leaving other variables alone.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116859 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/var-tracking.c

index 71ef415..b1a92ec 100644 (file)
@@ -1,3 +1,11 @@
+2006-09-11  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR target/28672
+       * var-tracking.c (dump_dataflow_set): Start dumping at
+       register zero.
+       (clobber_variable_part): Kill only the variable part in
+       registers holding it, leaving other variables alone.
+
 2006-09-11  Josh Triplett  <josh@freedesktop.org>
 
        * doc/extend.texi (Other Builtins): Actually use the macro
index e33950e..815faca 100644 (file)
@@ -1960,7 +1960,7 @@ dump_dataflow_set (dataflow_set *set)
 
   fprintf (dump_file, "Stack adjustment: " HOST_WIDE_INT_PRINT_DEC "\n",
           set->stack_adjust);
-  for (i = 1; i < FIRST_PSEUDO_REGISTER; i++)
+  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
     {
       if (set->regs[i])
        {
@@ -2212,8 +2212,32 @@ clobber_variable_part (dataflow_set *set, rtx loc, tree decl,
          for (node = next; node; node = next)
            {
              next = node->next;
-             if (REG_P (node->loc) && node->loc != loc)
-               var_reg_delete (set, node->loc, false);
+             if (node->loc != loc)
+               {
+                 if (REG_P (node->loc))
+                   {
+                     attrs anode, anext;
+                     attrs *anextp;
+
+                     /* Remove the variable part from the register's
+                        list, but preserve any other variable parts
+                        that might be regarded as live in that same
+                        register.  */
+                     anextp = &set->regs[REGNO (node->loc)];
+                     for (anode = *anextp; anode; anode = anext)
+                       {
+                         anext = anode->next;
+                         if (anode->decl == decl
+                             && anode->offset == offset)
+                           {
+                             pool_free (attrs_pool, anode);
+                             *anextp = anext;
+                           }
+                       }
+                   }
+
+                 delete_variable_part (set, node->loc, decl, offset);
+               }
            }
        }
     }