OSDN Git Service

* gcc.texi: Fixes for makeinfo 4.0 --html.
[pf3gnuchains/gcc-fork.git] / gcc / flow.c
index 8e7b9c3..131d88b 100644 (file)
@@ -264,11 +264,8 @@ struct propagate_block_info
   /* Bit N is set if register N is conditionally or unconditionally live.  */
   regset reg_live;
 
-  /* Bit N is set if register N is unconditionally dead this insn.  */
-  regset new_dead;
-
-  /* Bit N is set if register N is live this insn.  */
-  regset new_live;
+  /* Bit N is set if register N is set this insn.  */
+  regset new_set;
 
   /* Element N is the next insn that uses (hard or pseudo) register N
      within the current basic block; or zero, if there is no such insn.  */
@@ -353,9 +350,6 @@ void dump_flow_info                 PARAMS ((FILE *));
 void debug_flow_info                   PARAMS ((void));
 static void dump_edge_info             PARAMS ((FILE *, edge, int));
 
-static void count_reg_sets_1           PARAMS ((rtx, int));
-static void count_reg_sets             PARAMS ((rtx, int));
-static void count_reg_references       PARAMS ((rtx, int));
 static void invalidate_mems_from_autoinc PARAMS ((struct propagate_block_info *,
                                                  rtx));
 static void remove_fake_successors     PARAMS ((basic_block));
@@ -2515,8 +2509,6 @@ life_analysis (f, file, flags)
   if (flags & PROP_SCAN_DEAD_CODE)
     init_alias_analysis ();
 
-  max_regno = max_reg_num ();
-
   /* Always remove no-op moves.  Do this before other processing so
      that we don't have to keep re-scanning them.  */
   delete_noop_moves (f);
@@ -3055,6 +3047,10 @@ calculate_global_regs_live (blocks_in, blocks_out, flags)
          IOR_REG_SET (new_live_at_end, sb->global_live_at_start);
        }
 
+      /* Force the stack pointer to be live -- which might not already be 
+        the case for blocks within infinite loops.  */
+      SET_REGNO_REG_SET (new_live_at_end, STACK_POINTER_REGNUM);
+
       /* Regs used in phi nodes are not included in
         global_live_at_start, since they are live only along a
         particular edge.  Set those regs that are live because of a
@@ -3209,6 +3205,8 @@ allocate_reg_life_data ()
 {
   int i;
 
+  max_regno = max_reg_num ();
+
   /* Recalculate the register space, in case it has grown.  Old style
      vector oriented regsets would set regset_{size,bytes} here also.  */
   allocate_reg_info (max_regno, FALSE, FALSE);
@@ -3375,8 +3373,7 @@ propagate_one_insn (pbi, insn)
   }
 #endif /* AUTO_INC_DEC */
 
-  CLEAR_REG_SET (pbi->new_live);
-  CLEAR_REG_SET (pbi->new_dead);
+  CLEAR_REG_SET (pbi->new_set);
 
   /* If this is not the final pass, and this insn is copying the value of
      a library call and it's dead, don't scan the insns that perform the
@@ -3489,10 +3486,6 @@ propagate_one_insn (pbi, insn)
        }
     }
 
-  /* Update reg_live for the registers killed and used.  */
-  AND_COMPL_REG_SET (pbi->reg_live, pbi->new_dead);
-  IOR_REG_SET (pbi->reg_live, pbi->new_live);
-
   /* On final pass, update counts of how many insns in which each reg
      is live.  */
   if (flags & PROP_REG_INFO)
@@ -3527,8 +3520,7 @@ init_propagate_block_info (bb, live, local_set, flags)
   else
     pbi->reg_next_use = NULL;
 
-  pbi->new_live = BITMAP_XMALLOC ();
-  pbi->new_dead = BITMAP_XMALLOC ();
+  pbi->new_set = BITMAP_XMALLOC ();
 
   return pbi;
 }
@@ -3541,8 +3533,7 @@ free_propagate_block_info (pbi)
 {
   free_EXPR_LIST_list (&pbi->mem_set_list);
 
-  BITMAP_XFREE (pbi->new_live);
-  BITMAP_XFREE (pbi->new_dead);
+  BITMAP_XFREE (pbi->new_set);
 
   if (pbi->reg_next_use)
     free (pbi->reg_next_use);
@@ -3979,6 +3970,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
      int flags;
 {
   int regno_first = -1, regno_last = -1;
+  int not_dead = 0;
   int i;
 
   /* Some targets place small structures in registers for
@@ -3994,24 +3986,82 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
 
   /* Modifying just one hardware register of a multi-reg value or just a
      byte field of a register does not mean the value from before this insn
-     is now dead.  But it does mean liveness of that register at the end of
-     the block is significant.
+     is now dead.  Of course, if it was dead after it's unused now.  */
+
+  switch (GET_CODE (reg))
+    {
+    case ZERO_EXTRACT:
+    case SIGN_EXTRACT:
+    case STRICT_LOW_PART:
+      /* ??? Assumes STRICT_LOW_PART not used on multi-word registers.  */
+      do
+       reg = XEXP (reg, 0);
+      while (GET_CODE (reg) == SUBREG
+            || GET_CODE (reg) == ZERO_EXTRACT
+            || GET_CODE (reg) == SIGN_EXTRACT
+            || GET_CODE (reg) == STRICT_LOW_PART);
+      if (GET_CODE (reg) == MEM)
+       break;
+      not_dead = REGNO_REG_SET_P (pbi->reg_live, REGNO (reg));
+      /* FALLTHRU */
 
-     Within mark_set_1, however, we treat it as if the register is indeed
-     modified.  mark_used_regs will, however, also treat this register as
-     being used.  Thus, we treat these insns as setting a new value for the
-     register as a function of its old value.  This cases LOG_LINKS to be
-     made appropriately and this will help combine. 
+    case REG:
+      regno_last = regno_first = REGNO (reg);
+      if (regno_first < FIRST_PSEUDO_REGISTER)
+       regno_last += HARD_REGNO_NREGS (regno_first, GET_MODE (reg)) - 1;
+      break;
+
+    case SUBREG:
+      if (GET_CODE (SUBREG_REG (reg)) == REG)
+       {
+         enum machine_mode outer_mode = GET_MODE (reg);
+         enum machine_mode inner_mode = GET_MODE (SUBREG_REG (reg));
 
-     ??? This is all done incorrectly.  We should not be setting bits in
-     new_dead for these registers, since, as we just explained, they are
-     not dead.  We should be setting bits in local_set, and updating
-     LOG_LINKS, but that is different.  */
+         /* Identify the range of registers affected.  This is moderately
+            tricky for hard registers.  See alter_subreg.  */
 
-  while (GET_CODE (reg) == SUBREG || GET_CODE (reg) == ZERO_EXTRACT
-        || GET_CODE (reg) == SIGN_EXTRACT
-        || GET_CODE (reg) == STRICT_LOW_PART)
-    reg = XEXP (reg, 0);
+         regno_last = regno_first = REGNO (SUBREG_REG (reg));
+         if (regno_first < FIRST_PSEUDO_REGISTER)
+           {
+#ifdef ALTER_HARD_SUBREG
+             regno_first = ALTER_HARD_SUBREG (outer_mode, SUBREG_WORD (reg),
+                                              inner_mode, regno_first);
+#else
+             regno_first += SUBREG_WORD (reg);
+#endif
+             regno_last = (regno_first
+                           + HARD_REGNO_NREGS (regno_first, outer_mode) - 1);
+
+             /* Since we've just adjusted the register number ranges, make
+                sure REG matches.  Otherwise some_was_live will be clear
+                when it shouldn't have been, and we'll create incorrect
+                REG_UNUSED notes.  */
+             reg = gen_rtx_REG (outer_mode, regno_first);
+           }
+         else
+           {
+             /* If the number of words in the subreg is less than the number
+                of words in the full register, we have a well-defined partial
+                set.  Otherwise the high bits are undefined.
+
+                This is only really applicable to pseudos, since we just took
+                care of multi-word hard registers.  */
+             if (((GET_MODE_SIZE (outer_mode)
+                   + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
+                 < ((GET_MODE_SIZE (inner_mode)
+                     + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
+               not_dead = REGNO_REG_SET_P (pbi->reg_live, regno_first);
+
+             reg = SUBREG_REG (reg);
+           }
+       }
+      else
+       reg = SUBREG_REG (reg);
+      break;
+
+    default:
+      break;
+    }
 
   /* If this set is a MEM, then it kills any aliased writes. 
      If this set is a REG, then it kills any MEMs which use the reg.  */
@@ -4062,9 +4112,8 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
     }
 
   if (GET_CODE (reg) == REG
-      && (regno_first = REGNO (reg),
-         ! (regno_first == FRAME_POINTER_REGNUM
-            && (! reload_completed || frame_pointer_needed)))
+      && ! (regno_first == FRAME_POINTER_REGNUM
+           && (! reload_completed || frame_pointer_needed))
 #if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
       && ! (regno_first == HARD_FRAME_POINTER_REGNUM
            && (! reload_completed || frame_pointer_needed))
@@ -4076,17 +4125,13 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
     {
       int some_was_live = 0, some_was_dead = 0;
 
-      if (regno_first < FIRST_PSEUDO_REGISTER)
-       regno_last = (regno_first
-                     + HARD_REGNO_NREGS (regno_first, GET_MODE (reg)) - 1);
-      else
-        regno_last = regno_first;
-
       for (i = regno_first; i <= regno_last; ++i)
        {
          int needed_regno = REGNO_REG_SET_P (pbi->reg_live, i);
          if (pbi->local_set)
            SET_REGNO_REG_SET (pbi->local_set, i);
+         if (code != CLOBBER)
+           SET_REGNO_REG_SET (pbi->new_set, i);
 
          some_was_live |= needed_regno;
          some_was_dead |= ! needed_regno;
@@ -4161,6 +4206,8 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
                    LOG_LINKS (y) = alloc_INSN_LIST (insn, LOG_LINKS (y));
                }
            }
+         else if (not_dead)
+           ;
          else if (! some_was_live)
            {
              if (flags & PROP_REG_INFO)
@@ -4206,7 +4253,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
          && regno_first != STACK_POINTER_REGNUM)
        {
          for (i = regno_first; i <= regno_last; ++i)
-           SET_REGNO_REG_SET (pbi->new_dead, i);
+           CLEAR_REGNO_REG_SET (pbi->reg_live, i);
        }
     }
   else if (GET_CODE (reg) == REG)
@@ -4388,7 +4435,7 @@ find_auto_inc (pbi, x, insn)
              /* If the original source was dead, it's dead now.  */
              rtx note = find_reg_note (incr, REG_DEAD, NULL_RTX);
              if (note && XEXP (note, 0) != addr)
-               SET_REGNO_REG_SET (pbi->new_dead, REGNO (XEXP (note, 0)));
+               CLEAR_REGNO_REG_SET (pbi->reg_live, REGNO (XEXP (note, 0)));
              
              PUT_CODE (incr, NOTE);
              NOTE_LINE_NUMBER (incr) = NOTE_INSN_DELETED;
@@ -4421,20 +4468,17 @@ mark_used_reg (pbi, reg, cond, insn)
   int regno = REGNO (reg);
   int some_was_live = REGNO_REG_SET_P (pbi->reg_live, regno);
   int some_was_dead = ! some_was_live;
-
-  SET_REGNO_REG_SET (pbi->new_live, regno);
+  int some_not_set;
+  int n;
 
   /* A hard reg in a wide mode may really be multiple registers.
      If so, mark all of them just like the first.  */
   if (regno < FIRST_PSEUDO_REGISTER)
     {
-      int n = HARD_REGNO_NREGS (regno, GET_MODE (reg));
+      n = HARD_REGNO_NREGS (regno, GET_MODE (reg));
       while (--n > 0)
        {
-         int regno_n = regno + n;
-         int needed_regno = REGNO_REG_SET_P (pbi->reg_live, regno_n);
-
-         SET_REGNO_REG_SET (pbi->new_live, regno_n);
+         int needed_regno = REGNO_REG_SET_P (pbi->reg_live, regno + n);
          some_was_live |= needed_regno;
          some_was_dead |= ! needed_regno;
        }
@@ -4488,30 +4532,23 @@ mark_used_reg (pbi, reg, cond, insn)
        }
     }
 
+  /* Find out if any of the register was set this insn.  */
+  some_not_set = ! REGNO_REG_SET_P (pbi->new_set, regno);
+  if (regno < FIRST_PSEUDO_REGISTER)
+    {
+      n = HARD_REGNO_NREGS (regno, GET_MODE (reg));
+      while (--n > 0)
+       some_not_set |= ! REGNO_REG_SET_P (pbi->new_set, regno + n);
+    }
+
   /* Record and count the insns in which a reg dies.  If it is used in
      this insn and was dead below the insn then it dies in this insn.
      If it was set in this insn, we do not make a REG_DEAD note;
-     likewise if we already made such a note. 
-
-     ??? This could be done better.  In new_dead we have a record of 
-     which registers are set or clobbered this insn (which in itself is
-     slightly incorrect, see the commentary near strict_low_part in
-     mark_set_1), which should be the set of registers that we do not
-     wish to create death notes for under the above rule.  Note that
-     we have not yet processed the call-clobbered/call-used registers,
-     and they do not quite follow the above rule, since we do want death
-     notes for call-clobbered register arguments.  Which begs the whole
-     question of whether we should in fact have death notes for registers
-     used and clobbered (but not set) in the same insn.  The only useful
-     thing we ought to be getting from dead_or_set_p is detection of
-     duplicate death notes.  */
-
-  if ((pbi->flags & PROP_DEATH_NOTES)
+     likewise if we already made such a note.  */
+  if ((pbi->flags & (PROP_DEATH_NOTES | PROP_REG_INFO))
       && some_was_dead
-      && ! dead_or_set_p (insn, reg))
+      && some_not_set)
     {
-      int n;
-
       /* Check for the case where the register dying partially
         overlaps the register set by this insn.  */
       if (regno < FIRST_PSEUDO_REGISTER
@@ -4519,16 +4556,20 @@ mark_used_reg (pbi, reg, cond, insn)
        {
          n = HARD_REGNO_NREGS (regno, GET_MODE (reg));
          while (--n >= 0)
-           some_was_live |= dead_or_set_regno_p (insn, regno + n);
+           some_was_live |= REGNO_REG_SET_P (pbi->new_set, regno + n);
        }
 
       /* If none of the words in X is needed, make a REG_DEAD note.
         Otherwise, we must make partial REG_DEAD notes.  */
       if (! some_was_live)
        {
-         REG_NOTES (insn)
-           = alloc_EXPR_LIST (REG_DEAD, reg, REG_NOTES (insn));
-         REG_N_DEATHS (regno)++;
+         if ((pbi->flags & PROP_DEATH_NOTES)
+             && ! find_regno_note (insn, REG_DEAD, regno))
+           REG_NOTES (insn)
+             = alloc_EXPR_LIST (REG_DEAD, reg, REG_NOTES (insn));
+
+         if (pbi->flags & PROP_REG_INFO)
+           REG_N_DEATHS (regno)++;
        }
       else
        {
@@ -4537,7 +4578,7 @@ mark_used_reg (pbi, reg, cond, insn)
 
          n = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg)) - 1;
          for (; n >= regno; n--)
-           if (!REGNO_REG_SET_P (pbi->reg_live, n)
+           if (! REGNO_REG_SET_P (pbi->reg_live, n)
                && ! dead_or_set_regno_p (insn, n))
              REG_NOTES (insn)
                = alloc_EXPR_LIST (REG_DEAD,
@@ -4545,6 +4586,14 @@ mark_used_reg (pbi, reg, cond, insn)
                                   REG_NOTES (insn));
        }
     }
+
+  SET_REGNO_REG_SET (pbi->reg_live, regno);
+  if (regno < FIRST_PSEUDO_REGISTER)
+    {
+      n = HARD_REGNO_NREGS (regno, GET_MODE (reg));
+      while (--n > 0)
+       SET_REGNO_REG_SET (pbi->reg_live, regno + n);
+    }
 }
 
 /* Scan expression X and store a 1-bit in NEW_LIVE for each reg it uses.
@@ -5534,208 +5583,6 @@ compute_immediate_dominators (idom, dominators)
   sbitmap_vector_free (tmp);
 }
 
-/* Count for a single SET rtx, X.  */
-
-static void
-count_reg_sets_1 (x, loop_depth)
-     rtx x;
-     int loop_depth;
-{
-  register int regno;
-  register rtx reg = SET_DEST (x);
-
-  /* Find the register that's set/clobbered.  */
-  while (GET_CODE (reg) == SUBREG || GET_CODE (reg) == ZERO_EXTRACT
-        || GET_CODE (reg) == SIGN_EXTRACT
-        || GET_CODE (reg) == STRICT_LOW_PART)
-    reg = XEXP (reg, 0);
-
-  if (GET_CODE (reg) == PARALLEL
-      && GET_MODE (reg) == BLKmode)
-    {
-      register int i;
-      for (i = XVECLEN (reg, 0) - 1; i >= 0; i--)
-       count_reg_sets_1 (XVECEXP (reg, 0, i), loop_depth);
-      return;
-    }
-
-  if (GET_CODE (reg) == REG)
-    {
-      regno = REGNO (reg);
-      if (regno >= FIRST_PSEUDO_REGISTER)
-       {
-         /* Count (weighted) references, stores, etc.  This counts a
-            register twice if it is modified, but that is correct.  */
-         REG_N_SETS (regno)++;
-         REG_N_REFS (regno) += loop_depth + 1;
-       }
-    }
-}
-
-/* Increment REG_N_SETS for each SET or CLOBBER found in X; also increment
-   REG_N_REFS by the current loop depth for each SET or CLOBBER found.  */
-
-static void
-count_reg_sets  (x, loop_depth)
-     rtx x;
-     int loop_depth;
-{
-  register RTX_CODE code = GET_CODE (x);
-
-  if (code == SET || code == CLOBBER)
-    count_reg_sets_1 (x, loop_depth);
-  else if (code == PARALLEL)
-    {
-      register int i;
-      for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
-       {
-         code = GET_CODE (XVECEXP (x, 0, i));
-         if (code == SET || code == CLOBBER)
-           count_reg_sets_1 (XVECEXP (x, 0, i), loop_depth);
-       }
-    }
-}
-
-/* Increment REG_N_REFS by the current loop depth each register reference
-   found in X.  */
-
-static void
-count_reg_references (x, loop_depth)
-     rtx x;
-     int loop_depth;
-{
-  register RTX_CODE code;
-
- retry:
-  code = GET_CODE (x);
-  switch (code)
-    {
-    case LABEL_REF:
-    case SYMBOL_REF:
-    case CONST_INT:
-    case CONST:
-    case CONST_DOUBLE:
-    case PC:
-    case ADDR_VEC:
-    case ADDR_DIFF_VEC:
-    case ASM_INPUT:
-      return;
-
-#ifdef HAVE_cc0
-    case CC0:
-      return;
-#endif
-
-    case CLOBBER:
-      /* If we are clobbering a MEM, mark any registers inside the address
-        as being used.  */
-      if (GET_CODE (XEXP (x, 0)) == MEM)
-       count_reg_references (XEXP (XEXP (x, 0), 0), loop_depth);
-      return;
-
-    case SUBREG:
-      /* While we're here, optimize this case.  */
-      x = SUBREG_REG (x);
-
-      /* In case the SUBREG is not of a register, don't optimize */
-      if (GET_CODE (x) != REG)
-       {
-         count_reg_references (x, loop_depth);
-         return;
-       }
-
-      /* ... fall through ...  */
-
-    case REG:
-      if (REGNO (x) >= FIRST_PSEUDO_REGISTER)
-       REG_N_REFS (REGNO (x)) += loop_depth + 1;
-      return;
-
-    case SET:
-      {
-       register rtx testreg = SET_DEST (x);
-       int mark_dest = 0;
-
-       /* If storing into MEM, don't show it as being used.  But do
-          show the address as being used.  */
-       if (GET_CODE (testreg) == MEM)
-         {
-           count_reg_references (XEXP (testreg, 0), loop_depth);
-           count_reg_references (SET_SRC (x), loop_depth);
-           return;
-         }
-           
-       /* Storing in STRICT_LOW_PART is like storing in a reg
-          in that this SET might be dead, so ignore it in TESTREG.
-          but in some other ways it is like using the reg.
-
-          Storing in a SUBREG or a bit field is like storing the entire
-          register in that if the register's value is not used
-          then this SET is not needed.  */
-       while (GET_CODE (testreg) == STRICT_LOW_PART
-              || GET_CODE (testreg) == ZERO_EXTRACT
-              || GET_CODE (testreg) == SIGN_EXTRACT
-              || GET_CODE (testreg) == SUBREG)
-         {
-           /* Modifying a single register in an alternate mode
-              does not use any of the old value.  But these other
-              ways of storing in a register do use the old value.  */
-           if (GET_CODE (testreg) == SUBREG
-               && !(REG_SIZE (SUBREG_REG (testreg)) > REG_SIZE (testreg)))
-             ;
-           else
-             mark_dest = 1;
-
-           testreg = XEXP (testreg, 0);
-         }
-
-       /* If this is a store into a register,
-          recursively scan the value being stored.  */
-
-       if ((GET_CODE (testreg) == PARALLEL
-            && GET_MODE (testreg) == BLKmode)
-           || GET_CODE (testreg) == REG)
-         {
-           count_reg_references (SET_SRC (x), loop_depth);
-           if (mark_dest)
-             count_reg_references (SET_DEST (x), loop_depth);
-           return;
-         }
-      }
-      break;
-
-    default:
-      break;
-    }
-
-  /* Recursively scan the operands of this expression.  */
-
-  {
-    register const char *fmt = GET_RTX_FORMAT (code);
-    register int i;
-    
-    for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
-      {
-       if (fmt[i] == 'e')
-         {
-           /* Tail recursive case: save a function call level.  */
-           if (i == 0)
-             {
-               x = XEXP (x, 0);
-               goto retry;
-             }
-           count_reg_references (XEXP (x, i), loop_depth);
-         }
-       else if (fmt[i] == 'E')
-         {
-           register int j;
-           for (j = 0; j < XVECLEN (x, i); j++)
-             count_reg_references (XVECEXP (x, i, j), loop_depth);
-         }
-      }
-  }
-}
-
 /* Recompute register set/reference counts immediately prior to register
    allocation.
 
@@ -5760,70 +5607,8 @@ recompute_reg_usage (f, loop_step)
      rtx f ATTRIBUTE_UNUSED;
      int loop_step ATTRIBUTE_UNUSED;
 {
-  rtx insn;
-  int i, max_reg;
-  int index;
-  int loop_depth;
-
-  /* Clear out the old data.  */
-  max_reg = max_reg_num ();
-  for (i = FIRST_PSEUDO_REGISTER; i < max_reg; i++)
-    {
-      REG_N_SETS (i) = 0;
-      REG_N_REFS (i) = 0;
-    }
-
-  /* Scan each insn in the chain and count how many times each register is
-     set/used.  */
-  for (index = 0; index < n_basic_blocks; index++)
-    {
-      basic_block bb = BASIC_BLOCK (index);
-      loop_depth = bb->loop_depth;
-      for (insn = bb->head; insn; insn = NEXT_INSN (insn))
-       {
-         if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
-           {
-             rtx links;
-
-             /* This call will increment REG_N_SETS for each SET or CLOBBER
-                of a register in INSN.  It will also increment REG_N_REFS
-                by the loop depth for each set of a register in INSN.  */
-             count_reg_sets (PATTERN (insn), loop_depth);
-
-             /* count_reg_sets does not detect autoincrement address modes, so
-                detect them here by looking at the notes attached to INSN.  */
-             for (links = REG_NOTES (insn); links; links = XEXP (links, 1))
-               {
-                 if (REG_NOTE_KIND (links) == REG_INC)
-                   /* Count (weighted) references, stores, etc.  This
-                      counts a register twice if it is modified, but
-                      that is correct.  */
-                   REG_N_SETS (REGNO (XEXP (links, 0)))++;
-               }
-
-             /* This call will increment REG_N_REFS by the current loop depth
-                for each reference to a register in INSN.  */
-             count_reg_references (PATTERN (insn), loop_depth);
-
-             /* count_reg_references will not include counts for arguments to
-                function calls, so detect them here by examining the
-                CALL_INSN_FUNCTION_USAGE data.  */
-             if (GET_CODE (insn) == CALL_INSN)
-               {
-                 rtx note;
-
-                 for (note = CALL_INSN_FUNCTION_USAGE (insn);
-                      note;
-                      note = XEXP (note, 1))
-                   if (GET_CODE (XEXP (note, 0)) == USE)
-                     count_reg_references (XEXP (XEXP (note, 0), 0),
-                                           loop_depth);
-               }
-           }
-         if (insn == bb->end)
-           break;
-       }
-    }
+  allocate_reg_life_data ();
+  update_life_info (NULL, UPDATE_LIFE_LOCAL, PROP_REG_INFO);
 }
 
 /* Optionally removes all the REG_DEAD and REG_UNUSED notes from a set of