OSDN Git Service

* haifa-sched.c (add_dependence): Protect references to the
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Oct 1999 22:37:30 +0000 (22:37 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Oct 1999 22:37:30 +0000 (22:37 +0000)
        true dependency cache with #ifdef INSN_SCHEDULING.
        (remove_dependence): Similarly.

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

gcc/ChangeLog
gcc/haifa-sched.c

index 4631489..1de8bac 100644 (file)
@@ -24,6 +24,10 @@ Mon Oct 18 02:38:46 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
 
 Mon Oct 18 01:41:35 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * haifa-sched.c (add_dependence): Protect references to the
+       true dependency cache with #ifdef INSN_SCHEDULING.
+       (remove_dependence): Similarly.
+
        * mn10200.md (outline_epilogue_jump): Embed a (return) to indicate
        to the cfg code that this is a return instruction.
        * mn10300.md (return_internal): Similarly.
index f6e6325..7f55a1d 100644 (file)
@@ -793,7 +793,6 @@ add_dependence (insn, elem, dep_type)
       && (INSN_BB (elem) != INSN_BB (insn)))
     return;
 
-#endif
 
   /* If we already have a true dependency for ELEM, then we do not
      need to do anything.  Avoiding the list walk below can cut
@@ -801,6 +800,7 @@ add_dependence (insn, elem, dep_type)
   if (true_dependency_cache
       && TEST_BIT (true_dependency_cache[INSN_LUID (insn)], INSN_LUID (elem)))
     return;
+#endif
 
   /* Check that we don't already have this dependence.  */
   for (link = LOG_LINKS (insn); link; link = XEXP (link, 1))
@@ -811,10 +811,12 @@ add_dependence (insn, elem, dep_type)
        if ((int) dep_type < (int) REG_NOTE_KIND (link))
          PUT_REG_NOTE_KIND (link, dep_type);
 
+#ifdef INSN_SCHEDULING
        /* If we are adding a true dependency to INSN's LOG_LINKs, then
           note that in the bitmap cache of true dependency information.  */
        if ((int)dep_type == 0 && true_dependency_cache)
          SET_BIT (true_dependency_cache[INSN_LUID (insn)], INSN_LUID (elem));
+#endif
        return;
       }
   /* Might want to check one level of transitivity to save conses.  */
@@ -848,11 +850,13 @@ remove_dependence (insn, elem)
          else
            LOG_LINKS (insn) = next;
 
+#ifdef INSN_SCHEDULING
          /* If we are removing a true dependency from the LOG_LINKS list,
             make sure to remove it from the cache too.  */
          if (REG_NOTE_KIND (link) == 0 && true_dependency_cache)
            RESET_BIT (true_dependency_cache[INSN_LUID (insn)],
                       INSN_LUID (elem));
+#endif
 
          free_INSN_LIST_node (link);