Commit 58b1581b by Richard Stallman

(emit_reload_insns): If not -O, Don't try find_equiv_reg.

(choose_reload_regs): If not -O, don't inherit reloads.

From-SVN: r2607
parent 37548fa3
...@@ -4288,9 +4288,13 @@ choose_reload_regs (insn, avoid_return_reg) ...@@ -4288,9 +4288,13 @@ choose_reload_regs (insn, avoid_return_reg)
COPY_HARD_REG_SET (save_reload_reg_used_in_op_addr, COPY_HARD_REG_SET (save_reload_reg_used_in_op_addr,
reload_reg_used_in_op_addr); reload_reg_used_in_op_addr);
/* Try first with inheritance, then turning it off. */ /* If -O, try first with inheritance, then turning it off.
If not -O, don't do inheritance.
Using inheritance when not optimizing leads to paradoxes
with fp on the 68k: fp numbers (not NaNs) fail to be equal to themselves
because one side of the comparison might be inherited. */
for (inheritance = 1; inheritance >= 0; inheritance--) for (inheritance = optimize > 0; inheritance >= 0; inheritance--)
{ {
/* Process the reloads in order of preference just found. /* Process the reloads in order of preference just found.
Beyond this point, subregs can be found in reload_reg_rtx. Beyond this point, subregs can be found in reload_reg_rtx.
...@@ -4763,7 +4767,8 @@ emit_reload_insns (insn) ...@@ -4763,7 +4767,8 @@ emit_reload_insns (insn)
register. */ register. */
if (reload_secondary_reload[j] >= 0 if (reload_secondary_reload[j] >= 0
&& reload_secondary_icode[j] == CODE_FOR_nothing) && reload_secondary_icode[j] == CODE_FOR_nothing
&& optimize)
oldequiv oldequiv
= find_equiv_reg (old, insn, = find_equiv_reg (old, insn,
reload_reg_class[reload_secondary_reload[j]], reload_reg_class[reload_secondary_reload[j]],
...@@ -4778,7 +4783,7 @@ emit_reload_insns (insn) ...@@ -4778,7 +4783,7 @@ emit_reload_insns (insn)
or has yet to be emitted, in which case it doesn't matter or has yet to be emitted, in which case it doesn't matter
because we will use this equiv reg right away. */ because we will use this equiv reg right away. */
if (oldequiv == 0 if (oldequiv == 0 && optimize
&& (GET_CODE (old) == MEM && (GET_CODE (old) == MEM
|| (GET_CODE (old) == REG || (GET_CODE (old) == REG
&& REGNO (old) >= FIRST_PSEUDO_REGISTER && REGNO (old) >= FIRST_PSEUDO_REGISTER
......
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