+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.
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)
{