flow.c (calculate_global_regs_live): Force stack pointer live at end.
authorRichard Henderson <rth@cygnus.com>
Thu, 27 Apr 2000 07:39:51 +0000 (00:39 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 27 Apr 2000 07:39:51 +0000 (00:39 -0700)
        * flow.c (calculate_global_regs_live): Force stack pointer
        live at end.

From-SVN: r33476

gcc/ChangeLog
gcc/flow.c

index 4354846d38158ac60e92c9b15ceaf51a3d8f617b..055cfbf33277e272231f38d9e271046b7ffeeacc 100644 (file)
@@ -3,6 +3,9 @@
        * flow.c (allocate_reg_life_data): Set max_regno here ...
        (life_analysis): ... not here.
 
+       * flow.c (calculate_global_regs_live): Force stack pointer
+       live at end.
+
 2000-04-26  Richard Henderson  <rth@cygnus.com>
 
        * jump.c (redirect_exp_1): Rework from old redirect_exp.  Never
index 5a729c77d7d38459afabd0d392e5152d6755eab5..72a8372e05ed1d46cdd263ac81fb5682071698d0 100644 (file)
@@ -3050,6 +3050,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