summaryrefslogtreecommitdiff
path: root/gcc/sched-deps.c
diff options
context:
space:
mode:
authorhpenner <hpenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-11 09:17:38 +0000
committerhpenner <hpenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-11 09:17:38 +0000
commitb69139c7db8553e71590350641ddd578cfff98e2 (patch)
tree99c6c896b78762f0154b920cb1e21308b46f43d3 /gcc/sched-deps.c
parent9f8054625ac4653f4f48efa6a36101d14ae68b4f (diff)
downloadgcc-b69139c7db8553e71590350641ddd578cfff98e2.tar.gz
* df.c (read_modify_subreg_p): Change from static to global.
* df.h (read_modify_subreg_p): Add prototype. * sched-deps.c (sched_analyze_1): Generate true dependency for strict_low_part, certain subregs and zero/sign_extract. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64164 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r--gcc/sched-deps.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index b3c619df51d..874ebc26c7a 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -42,6 +42,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "sched-int.h"
#include "params.h"
#include "cselib.h"
+#include "df.h"
extern char *reg_known_equiv_p;
extern rtx *reg_known_value;
@@ -468,6 +469,19 @@ sched_analyze_1 (deps, x, insn)
while (GET_CODE (dest) == STRICT_LOW_PART || GET_CODE (dest) == SUBREG
|| GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SIGN_EXTRACT)
{
+ if (GET_CODE (dest) == STRICT_LOW_PART
+ || GET_CODE (dest) == ZERO_EXTRACT
+ || GET_CODE (dest) == SIGN_EXTRACT
+ || read_modify_subreg_p (dest))
+ {
+ /* These both read and modify the result. We must handle
+ them as writes to get proper dependencies for following
+ instructions. We must handle them as reads to get proper
+ dependencies from this to previous instructions.
+ Thus we need to call sched_analyze_2. */
+
+ sched_analyze_2 (deps, XEXP (dest, 0), insn);
+ }
if (GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SIGN_EXTRACT)
{
/* The second and third arguments are values read by this insn. */