diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-03-22 14:11:37 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-03-22 14:11:37 +0000 |
commit | b0c419a0c79ad687017268c751253bcd75043cbe (patch) | |
tree | cdf04df88173348b8dc41cbb84125e2ecba605b3 /gcc/local-alloc.c | |
parent | 5d21f7b7275322db06b5a6294af634ceffd7f090 (diff) | |
download | ppe42-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/local-alloc.c')
-rw-r--r-- | gcc/local-alloc.c | 20 |
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; } |