Fix for non-scheduling machines

Jeffrey A Law law@cygnus.com
Mon Oct 18 15:39:00 GMT 1999


Sigh.  Who would have ever guessed that a hunk of code in the scheduler
was still used outside the scheduler.  I thought we fixed that braindamage
long ago (yes, but only for the aliasing code the peanut gallery shouts!)

Anyway, this gets the tree building again on targets that do not perform
instruction scheduling.

        * haifa-sched.c (add_dependence): Protect references to the
        true dependency cache with #ifdef INSN_SCHEDULING.
        (remove_dependence): Similarly.


Index: haifa-sched.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/haifa-sched.c,v
retrieving revision 1.128
diff -c -3 -p -r1.128 haifa-sched.c
*** haifa-sched.c	1999/10/17 21:47:03	1.128
--- haifa-sched.c	1999/10/18 22:32:52
*************** add_dependence (insn, elem, dep_type)
*** 848,854 ****
        && (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
--- 848,853 ----
*************** add_dependence (insn, elem, dep_type)
*** 856,861 ****
--- 855,861 ----
    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))
*************** add_dependence (insn, elem, dep_type)
*** 866,875 ****
--- 866,877 ----
  	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.  */
*************** remove_dependence (insn, elem)
*** 902,912 ****
--- 904,916 ----
  	  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);
  





More information about the Gcc-patches mailing list