Commit c7b1ed2b by Richard Kenner

(optimize_reg_copy_1): Only update reg_live_length if it is

non-negative.

From-SVN: r11596
parent 55e44288
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment