Commit fd969c7c by Alexandre Oliva Committed by Alexandre Oliva

sh.c (sh_expand_prologue): Insns that set up the PIC register may be dead.

* config/sh/sh.c (sh_expand_prologue): Insns that set up the PIC
register may be dead.

From-SVN: r40550
parent 91c251fd
2001-03-16 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.c (sh_expand_prologue): Insns that set up the PIC
register may be dead.
2001-03-16 Brad Lucier <lucier@math.purdue.edu>
* Makefile.in (hash.o): Depend on CONFIG_H.
......
......@@ -3987,7 +3987,23 @@ sh_expand_prologue ()
push_regs (live_regs_mask, live_regs_mask2);
if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
emit_insn (gen_GOTaddr2picreg ());
{
rtx insn = get_last_insn ();
rtx last = emit_insn (gen_GOTaddr2picreg ());
/* Mark these insns as possibly dead. Sometimes, flow2 may
delete all uses of the PIC register. In this case, let it
delete the initialization too. */
do
{
insn = NEXT_INSN (insn);
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,
const0_rtx,
REG_NOTES (insn));
}
while (insn != last);
}
if (target_flags != save_flags)
{
......
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