summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-03-22 14:11:37 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-03-22 14:11:37 +0000
commitb0c419a0c79ad687017268c751253bcd75043cbe (patch)
treecdf04df88173348b8dc41cbb84125e2ecba605b3 /gcc
parent5d21f7b7275322db06b5a6294af634ceffd7f090 (diff)
downloadppe42-gcc-b0c419a0c79ad687017268c751253bcd75043cbe.tar.gz
ppe42-gcc-b0c419a0c79ad687017268c751253bcd75043cbe.zip
(optimize_reg_copy_1): Only update reg_live_length if it is
non-negative. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11596 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/local-alloc.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index c36aca8948b..bde83b2e4c3 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -818,18 +818,24 @@ optimize_reg_copy_1 (insn, dest, src)
{
if (sregno >= FIRST_PSEUDO_REGISTER)
{
- reg_live_length[sregno] -= length;
- /* reg_live_length is only an approximation after combine
- if sched is not run, so make sure that we still have
- a reasonable value. */
- if (reg_live_length[sregno] < 2)
- reg_live_length[sregno] = 2;
+ if (reg_live_length[sregno] >= 0)
+ {
+ reg_live_length[sregno] -= length;
+ /* reg_live_length is only an approximation after
+ combine if sched is not run, so make sure that we
+ still have a reasonable value. */
+ if (reg_live_length[sregno] < 2)
+ reg_live_length[sregno] = 2;
+ }
+
reg_n_calls_crossed[sregno] -= n_calls;
}
if (dregno >= FIRST_PSEUDO_REGISTER)
{
- reg_live_length[dregno] += d_length;
+ if (reg_live_length[dregno] >= 0)
+ reg_live_length[dregno] += d_length;
+
reg_n_calls_crossed[dregno] += d_n_calls;
}
OpenPOWER on IntegriCloud