summaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-06 20:10:35 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-06 20:10:35 +0000
commit3cec634153acdaad82a0947e7d06af2912634534 (patch)
tree5d1d882247fd66bae6398a9890456f624b5faa40 /gcc/loop.c
parent5923a5e78781a98a9fbb1acaa222864c23cc26ef (diff)
downloadgcc-3cec634153acdaad82a0947e7d06af2912634534.tar.gz
* loop.c (force_movables): Transitively increase the priorities of
all insns forces by an insn, not just the first one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77419 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 55c9834b288..911d561fd6b 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -1469,12 +1469,18 @@ force_movables (struct loop_movables *movables)
m = 0;
/* Increase the priority of the moving the first insn
- since it permits the second to be moved as well. */
+ since it permits the second to be moved as well.
+ Likewise for insns already forced by the first insn. */
if (m != 0)
{
+ struct movable *m2;
+
m->forces = m1;
- m1->lifetime += m->lifetime;
- m1->savings += m->savings;
+ for (m2 = m1; m2; m2 = m2->forces)
+ {
+ m2->lifetime += m->lifetime;
+ m2->savings += m->savings;
+ }
}
}
}