(optimize_reg_copy_1): After decreasing sregno's
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Dec 1993 01:35:17 +0000 (01:35 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Dec 1993 01:35:17 +0000 (01:35 +0000)
reg_live_length, correct it if it is now obviously too small.

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

gcc/local-alloc.c

index d626fd7..11e58e3 100644 (file)
@@ -791,6 +791,11 @@ optimize_reg_copy_1 (insn, dest, src)
              if (sregno >= FIRST_PSEUDO_REGISTER)
                {
                  reg_live_length[sregno] -= length;
+                 /* reg_live_length is only an approximation after combine
+                    if sched is not run, so make sure that we still have
+                    a reasonable value.  */
+                 if (reg_live_length[sregno] < 2)
+                   reg_live_length[sregno] = 2;
                  reg_n_calls_crossed[sregno] -= n_calls;
                }