aboutsummaryrefslogtreecommitdiff
path: root/gcc/sched.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-09-24 22:44:06 -0700
committerJim Wilson <wilson@gcc.gnu.org>1992-09-24 22:44:06 -0700
commitbc78eb101e3a9e9cdd0ffc82b1d6c6dbc8c53af4 (patch)
treeaf989ebd2a79101931368d409e0c50a5469f2ed2 /gcc/sched.c
parentb085d1c8f2927f04a8b00d2ef3fbc27e1455e257 (diff)
downloadgcc-bc78eb101e3a9e9cdd0ffc82b1d6c6dbc8c53af4.zip
gcc-bc78eb101e3a9e9cdd0ffc82b1d6c6dbc8c53af4.tar.gz
gcc-bc78eb101e3a9e9cdd0ffc82b1d6c6dbc8c53af4.tar.bz2
(sched_analyze_2, PRE_DEC case): Call sched_analyze_2 in
addition to sched_analyze_1. From-SVN: r2240
Diffstat (limited to 'gcc/sched.c')
-rw-r--r--gcc/sched.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/sched.c b/gcc/sched.c
index e984210..be48e8e 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;
}