Commit 87373fba by Richard Henderson Committed by Richard Henderson

haifa-sched.c (sched_analyze): Clear LOG_LINKS before calling sched_analyze_insn.

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

From-SVN: r28945
parent 8e260ba4
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> Sat Aug 28 15:58:16 1999 Mumit Khan <khan@xraylith.wisc.edu>
* i386/winnt.c (export_list): New type. * i386/winnt.c (export_list): New type.
......
...@@ -3371,10 +3371,8 @@ sched_analyze_1 (x, insn) ...@@ -3371,10 +3371,8 @@ sched_analyze_1 (x, insn)
pending_mem = pending_read_mems; pending_mem = pending_read_mems;
while (pending) while (pending)
{ {
/* If a dependency already exists, don't create a new one. */ if (anti_dependence (XEXP (pending_mem, 0), dest))
if (!find_insn_list (XEXP (pending, 0), LOG_LINKS (insn))) 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 = XEXP (pending, 1);
pending_mem = XEXP (pending_mem, 1); pending_mem = XEXP (pending_mem, 1);
...@@ -3384,10 +3382,8 @@ sched_analyze_1 (x, insn) ...@@ -3384,10 +3382,8 @@ sched_analyze_1 (x, insn)
pending_mem = pending_write_mems; pending_mem = pending_write_mems;
while (pending) while (pending)
{ {
/* If a dependency already exists, don't create a new one. */ if (output_dependence (XEXP (pending_mem, 0), dest))
if (!find_insn_list (XEXP (pending, 0), LOG_LINKS (insn))) 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 = XEXP (pending, 1);
pending_mem = XEXP (pending_mem, 1); pending_mem = XEXP (pending_mem, 1);
...@@ -3529,10 +3525,8 @@ sched_analyze_2 (x, insn) ...@@ -3529,10 +3525,8 @@ sched_analyze_2 (x, insn)
pending_mem = pending_read_mems; pending_mem = pending_read_mems;
while (pending) while (pending)
{ {
/* If a dependency already exists, don't create a new one. */ if (read_dependence (XEXP (pending_mem, 0), x))
if (!find_insn_list (XEXP (pending, 0), LOG_LINKS (insn))) 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 = XEXP (pending, 1);
pending_mem = XEXP (pending_mem, 1); pending_mem = XEXP (pending_mem, 1);
...@@ -3542,11 +3536,9 @@ sched_analyze_2 (x, insn) ...@@ -3542,11 +3536,9 @@ sched_analyze_2 (x, insn)
pending_mem = pending_write_mems; pending_mem = pending_write_mems;
while (pending) while (pending)
{ {
/* If a dependency already exists, don't create a new one. */ if (true_dependence (XEXP (pending_mem, 0), VOIDmode,
if (!find_insn_list (XEXP (pending, 0), LOG_LINKS (insn))) x, rtx_varies_p))
if (true_dependence (XEXP (pending_mem, 0), VOIDmode, add_dependence (insn, XEXP (pending, 0), 0);
x, rtx_varies_p))
add_dependence (insn, XEXP (pending, 0), 0);
pending = XEXP (pending, 1); pending = XEXP (pending, 1);
pending_mem = XEXP (pending_mem, 1); pending_mem = XEXP (pending_mem, 1);
...@@ -3819,6 +3811,9 @@ sched_analyze (head, tail) ...@@ -3819,6 +3811,9 @@ sched_analyze (head, tail)
{ {
if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN) 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. */ /* Make each JUMP_INSN a scheduling barrier for memory references. */
if (GET_CODE (insn) == JUMP_INSN) if (GET_CODE (insn) == JUMP_INSN)
last_pending_memory_flush last_pending_memory_flush
...@@ -3833,6 +3828,9 @@ sched_analyze (head, tail) ...@@ -3833,6 +3828,9 @@ sched_analyze (head, tail)
CANT_MOVE (insn) = 1; 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 /* Any instruction using a hard register which may get clobbered
by a call needs to be marked as dependent on this call. by a call needs to be marked as dependent on this call.
This prevents a use of a hard return reg from being moved This prevents a use of a hard return reg from being moved
...@@ -7158,8 +7156,7 @@ add_branch_dependences (head, tail) ...@@ -7158,8 +7156,7 @@ add_branch_dependences (head, tail)
if (INSN_REF_COUNT (insn) != 0) if (INSN_REF_COUNT (insn) != 0)
continue; 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; INSN_REF_COUNT (insn) = 1;
/* Skip over insns that are part of a group. */ /* Skip over insns that are part of a group. */
......
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