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

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

From-SVN: r30074
This commit is contained in:
Jeffrey A Law 1999-10-18 22:37:30 +00:00 committed by Jeff Law
parent c88e820682
commit 35c95c5a65
2 changed files with 9 additions and 1 deletions

View 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.

View 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);