From fe3e667fb42a7ebf483437373ad4426884eaf6af Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 31 Aug 2001 11:01:08 -0700 Subject: [PATCH] sched-deps.c (add_dependence): Don't elide dependancy if the conditional used by insn is modified in elem. * sched-deps.c (add_dependence): Don't elide dependancy if the conditional used by insn is modified in elem. From-SVN: r45330 --- gcc/ChangeLog | 5 +++++ gcc/sched-deps.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d32c720889..b176a4d4374 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-08-31 Richard Henderson + + * sched-deps.c (add_dependence): Don't elide dependancy if the + conditional used by insn is modified in elem. + 2001-08-31 Nick Clifton * config/v850/v850.h (OUTPUT_ADDR_CONST_EXTRA): Define. diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 4a71d104c6c..dbbb140671b 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -213,11 +213,16 @@ add_dependence (insn, elem, dep_type) /* flow.c doesn't handle conditional lifetimes entirely correctly; calls mess up the conditional lifetimes. */ + /* ??? add_dependence is the wrong place to be eliding dependencies, + as that forgets that the condition expressions themselves may + be dependent. */ if (GET_CODE (insn) != CALL_INSN && GET_CODE (elem) != CALL_INSN) { cond1 = get_condition (insn); cond2 = get_condition (elem); - if (cond1 && cond2 && conditions_mutex_p (cond1, cond2)) + if (cond1 && cond2 + && conditions_mutex_p (cond1, cond2) + && !modified_in_p (cond1, elem)) return; }