From bc78eb101e3a9e9cdd0ffc82b1d6c6dbc8c53af4 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 24 Sep 1992 22:44:06 -0700 Subject: [PATCH] (sched_analyze_2, PRE_DEC case): Call sched_analyze_2 in addition to sched_analyze_1. From-SVN: r2240 --- gcc/sched.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/sched.c b/gcc/sched.c index e9842107d13..be48e8e2454 100644 --- a/gcc/sched.c +++ b/gcc/sched.c @@ -1860,7 +1860,13 @@ sched_analyze_2 (x, insn) case POST_DEC: case PRE_INC: case POST_INC: - /* These read and modify the result; just consider them writes. */ + /* 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 pass them to both sched_analyze_1 + and sched_analyze_2. We must call sched_analyze_2 first in order + to get the proper antecedent for the read. */ + sched_analyze_2 (XEXP (x, 0), insn); sched_analyze_1 (x, insn); return; }