Commit 35c95c5a by Jeffrey A Law Committed by Jeff Law

haifa-sched.c (add_dependence): Protect references to the true dependency cache…

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
parent c88e8206
...@@ -24,6 +24,10 @@ Mon Oct 18 02:38:46 1999 Bernd Schmidt <bernds@cygnus.co.uk> ...@@ -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) 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 * mn10200.md (outline_epilogue_jump): Embed a (return) to indicate
to the cfg code that this is a return instruction. to the cfg code that this is a return instruction.
* mn10300.md (return_internal): Similarly. * mn10300.md (return_internal): Similarly.
......
...@@ -793,7 +793,6 @@ add_dependence (insn, elem, dep_type) ...@@ -793,7 +793,6 @@ add_dependence (insn, elem, dep_type)
&& (INSN_BB (elem) != INSN_BB (insn))) && (INSN_BB (elem) != INSN_BB (insn)))
return; return;
#endif
/* If we already have a true dependency for ELEM, then we do not /* If we already have a true dependency for ELEM, then we do not
need to do anything. Avoiding the list walk below can cut need to do anything. Avoiding the list walk below can cut
...@@ -801,6 +800,7 @@ add_dependence (insn, elem, dep_type) ...@@ -801,6 +800,7 @@ add_dependence (insn, elem, dep_type)
if (true_dependency_cache if (true_dependency_cache
&& TEST_BIT (true_dependency_cache[INSN_LUID (insn)], INSN_LUID (elem))) && TEST_BIT (true_dependency_cache[INSN_LUID (insn)], INSN_LUID (elem)))
return; return;
#endif
/* Check that we don't already have this dependence. */ /* Check that we don't already have this dependence. */
for (link = LOG_LINKS (insn); link; link = XEXP (link, 1)) for (link = LOG_LINKS (insn); link; link = XEXP (link, 1))
...@@ -811,10 +811,12 @@ add_dependence (insn, elem, dep_type) ...@@ -811,10 +811,12 @@ add_dependence (insn, elem, dep_type)
if ((int) dep_type < (int) REG_NOTE_KIND (link)) if ((int) dep_type < (int) REG_NOTE_KIND (link))
PUT_REG_NOTE_KIND (link, dep_type); PUT_REG_NOTE_KIND (link, dep_type);
#ifdef INSN_SCHEDULING
/* If we are adding a true dependency to INSN's LOG_LINKs, then /* If we are adding a true dependency to INSN's LOG_LINKs, then
note that in the bitmap cache of true dependency information. */ note that in the bitmap cache of true dependency information. */
if ((int)dep_type == 0 && true_dependency_cache) if ((int)dep_type == 0 && true_dependency_cache)
SET_BIT (true_dependency_cache[INSN_LUID (insn)], INSN_LUID (elem)); SET_BIT (true_dependency_cache[INSN_LUID (insn)], INSN_LUID (elem));
#endif
return; return;
} }
/* Might want to check one level of transitivity to save conses. */ /* Might want to check one level of transitivity to save conses. */
...@@ -848,11 +850,13 @@ remove_dependence (insn, elem) ...@@ -848,11 +850,13 @@ remove_dependence (insn, elem)
else else
LOG_LINKS (insn) = next; LOG_LINKS (insn) = next;
#ifdef INSN_SCHEDULING
/* If we are removing a true dependency from the LOG_LINKS list, /* If we are removing a true dependency from the LOG_LINKS list,
make sure to remove it from the cache too. */ make sure to remove it from the cache too. */
if (REG_NOTE_KIND (link) == 0 && true_dependency_cache) if (REG_NOTE_KIND (link) == 0 && true_dependency_cache)
RESET_BIT (true_dependency_cache[INSN_LUID (insn)], RESET_BIT (true_dependency_cache[INSN_LUID (insn)],
INSN_LUID (elem)); INSN_LUID (elem));
#endif
free_INSN_LIST_node (link); free_INSN_LIST_node (link);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment