OSDN Git Service

(optimize_reg_copy_1): If P is a CALL_INSN, count it as being crossed
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Nov 1992 12:23:39 +0000 (12:23 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Nov 1992 12:23:39 +0000 (12:23 +0000)
by SRC since SRC used to die there.

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

gcc/local-alloc.c

index 830f89f..471bd04 100644 (file)
@@ -697,6 +697,12 @@ optimize_reg_copy_1 (insn, dest, src)
          int n_calls = 0;
          int d_n_calls = 0;
 
+         /* If P is a CALL_INSN, SRC crosses one more call, since it
+            used to die there.  */
+
+         if (GET_CODE (p) == CALL_INSN)
+           n_calls++;
+
          /* We can do the optimization.  Scan forward from INSN again,
             replacing regs as we go.  Set FAILED if a replacement can't
             be done.  In that case, we can't move the death note for SRC.