OSDN Git Service

* haifa-sched.c (sched_analyze): Clear LOG_LINKS before calling
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 28 Aug 1999 23:20:34 +0000 (23:20 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 28 Aug 1999 23:20:34 +0000 (23:20 +0000)
        sched_analyze_insn.
        (sched_analyze_1): Let add_dependence care for not adding dups.
        (sched_analyze_2): Likewise.
        (add_branch_dependences): Likewise.

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

gcc/ChangeLog
gcc/haifa-sched.c

index 29cd896..89de67f 100644 (file)
@@ -1,3 +1,11 @@
+Sat Aug 28 16:20:12 1999  Richard Henderson  <rth@cygnus.com>
+
+        * haifa-sched.c (sched_analyze): Clear LOG_LINKS before calling
+        sched_analyze_insn.
+        (sched_analyze_1): Let add_dependence care for not adding dups.
+        (sched_analyze_2): Likewise.
+        (add_branch_dependences): Likewise.
+
 Sat Aug 28 15:58:16 1999  Mumit Khan  <khan@xraylith.wisc.edu>
 
        * i386/winnt.c (export_list): New type.
index 42f44b7..43dc953 100644 (file)
@@ -3371,10 +3371,8 @@ sched_analyze_1 (x, insn)
          pending_mem = pending_read_mems;
          while (pending)
            {
-             /* If a dependency already exists, don't create a new one.  */
-             if (!find_insn_list (XEXP (pending, 0), LOG_LINKS (insn)))
-               if (anti_dependence (XEXP (pending_mem, 0), dest))
-                 add_dependence (insn, XEXP (pending, 0), REG_DEP_ANTI);
+             if (anti_dependence (XEXP (pending_mem, 0), dest))
+               add_dependence (insn, XEXP (pending, 0), REG_DEP_ANTI);
 
              pending = XEXP (pending, 1);
              pending_mem = XEXP (pending_mem, 1);
@@ -3384,10 +3382,8 @@ sched_analyze_1 (x, insn)
          pending_mem = pending_write_mems;
          while (pending)
            {
-             /* If a dependency already exists, don't create a new one.  */
-             if (!find_insn_list (XEXP (pending, 0), LOG_LINKS (insn)))
-               if (output_dependence (XEXP (pending_mem, 0), dest))
-                 add_dependence (insn, XEXP (pending, 0), REG_DEP_OUTPUT);
+             if (output_dependence (XEXP (pending_mem, 0), dest))
+               add_dependence (insn, XEXP (pending, 0), REG_DEP_OUTPUT);
 
              pending = XEXP (pending, 1);
              pending_mem = XEXP (pending_mem, 1);
@@ -3529,10 +3525,8 @@ sched_analyze_2 (x, insn)
        pending_mem = pending_read_mems;
        while (pending)
          {
-           /* If a dependency already exists, don't create a new one.  */
-           if (!find_insn_list (XEXP (pending, 0), LOG_LINKS (insn)))
-             if (read_dependence (XEXP (pending_mem, 0), x))
-               add_dependence (insn, XEXP (pending, 0), REG_DEP_ANTI);
+           if (read_dependence (XEXP (pending_mem, 0), x))
+             add_dependence (insn, XEXP (pending, 0), REG_DEP_ANTI);
 
            pending = XEXP (pending, 1);
            pending_mem = XEXP (pending_mem, 1);
@@ -3542,11 +3536,9 @@ sched_analyze_2 (x, insn)
        pending_mem = pending_write_mems;
        while (pending)
          {
-           /* If a dependency already exists, don't create a new one.  */
-           if (!find_insn_list (XEXP (pending, 0), LOG_LINKS (insn)))
-             if (true_dependence (XEXP (pending_mem, 0), VOIDmode,
-                 x, rtx_varies_p))
-               add_dependence (insn, XEXP (pending, 0), 0);
+           if (true_dependence (XEXP (pending_mem, 0), VOIDmode,
+               x, rtx_varies_p))
+             add_dependence (insn, XEXP (pending, 0), 0);
 
            pending = XEXP (pending, 1);
            pending_mem = XEXP (pending_mem, 1);
@@ -3819,6 +3811,9 @@ sched_analyze (head, tail)
     {
       if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN)
        {
+         /* Clear out the stale LOG_LINKS from flow.  */
+         free_INSN_LIST_list (&LOG_LINKS (insn));
+
          /* Make each JUMP_INSN a scheduling barrier for memory references.  */
          if (GET_CODE (insn) == JUMP_INSN)
            last_pending_memory_flush
@@ -3833,6 +3828,9 @@ sched_analyze (head, tail)
 
          CANT_MOVE (insn) = 1;
 
+         /* Clear out the stale LOG_LINKS from flow.  */
+         free_INSN_LIST_list (&LOG_LINKS (insn));
+
          /* Any instruction using a hard register which may get clobbered
             by a call needs to be marked as dependent on this call.
             This prevents a use of a hard return reg from being moved
@@ -7158,8 +7156,7 @@ add_branch_dependences (head, tail)
        if (INSN_REF_COUNT (insn) != 0)
          continue;
 
-       if (!find_insn_list (last, LOG_LINKS (insn)))
-         add_dependence (last, insn, REG_DEP_ANTI);
+       add_dependence (last, insn, REG_DEP_ANTI);
        INSN_REF_COUNT (insn) = 1;
 
        /* Skip over insns that are part of a group.  */