diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-12-23 17:35:17 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-12-23 17:35:17 -0800 |
commit | 2d19a71c10fd27e6bd565150104a81541b039945 (patch) | |
tree | 3f4a7d7450c4428de7a682d5ecf2ccef3d41e1ce | |
parent | b418c26e7fc3e13bd76e1c62f0fd6cde195ea490 (diff) | |
download | gcc-2d19a71c10fd27e6bd565150104a81541b039945.zip gcc-2d19a71c10fd27e6bd565150104a81541b039945.tar.gz gcc-2d19a71c10fd27e6bd565150104a81541b039945.tar.bz2 |
(optimize_reg_copy_1): After decreasing sregno's
reg_live_length, correct it if it is now obviously too small.
From-SVN: r6291
-rw-r--r-- | gcc/local-alloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index d626fd7..11e58e3 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -791,6 +791,11 @@ 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; reg_n_calls_crossed[sregno] -= n_calls; } |