blocks within infinite loops. */
if (!reload_completed)
{
+ unsigned int pic_offset_table_regnum = PIC_OFFSET_TABLE_REGNUM;
/* Any reference to any pseudo before reload is a potential
reference of the frame pointer. */
bitmap_set_bit (&df->hardware_regs_used, FRAME_POINTER_REGNUM);
/* Any constant, or pseudo with constant equivalences, may
require reloading from memory using the pic register. */
- if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM
- && fixed_regs[PIC_OFFSET_TABLE_REGNUM])
- bitmap_set_bit (&df->hardware_regs_used, PIC_OFFSET_TABLE_REGNUM);
+ if (pic_offset_table_regnum != INVALID_REGNUM
+ && fixed_regs[pic_offset_table_regnum])
+ bitmap_set_bit (&df->hardware_regs_used, pic_offset_table_regnum);
}
EXECUTE_IF_SET_IN_BITMAP (df_lr->out_of_date_transfer_functions, 0, bb_index, bi)
dead_debug_reset (struct dead_debug *debug, unsigned int dregno)
{
struct dead_debug_use **tailp = &debug->head;
+ struct dead_debug_use **insnp = &debug->head;
struct dead_debug_use *cur;
rtx insn;
debug->to_rescan = BITMAP_ALLOC (NULL);
bitmap_set_bit (debug->to_rescan, INSN_UID (insn));
XDELETE (cur);
+ /* If the current use isn't the first one attached to INSN, go back
+ to this first use. We assume that the uses attached to an insn
+ are adjacent. */
+ if (tailp != insnp && DF_REF_INSN ((*insnp)->use) == insn)
+ tailp = insnp;
+ /* Then remove all the other uses attached to INSN. */
+ while ((cur = *tailp) && DF_REF_INSN (cur->use) == insn)
+ {
+ *tailp = cur->next;
+ XDELETE (cur);
+ }
+ insnp = tailp;
}
else
- tailp = &(*tailp)->next;
+ {
+ if (DF_REF_INSN ((*insnp)->use) != DF_REF_INSN (cur->use))
+ insnp = tailp;
+ tailp = &(*tailp)->next;
+ }
}
}
tailp = &(*tailp)->next;
}
- gcc_assert (reg);
+ /* We may have dangling bits in debug->used for registers that were part
+ of a multi-register use, one component of which has been reset. */
+ if (reg == NULL)
+ return;
/* Create DEBUG_EXPR (and DEBUG_EXPR_DECL). */
dval = make_debug_expr_from_rtl (reg);
while (*mws_rec)
{
struct df_mw_hardreg *mws = *mws_rec;
- if ((DF_MWS_REG_DEF_P (mws))
+ if (DF_MWS_REG_USE_P (mws)
&& !df_ignore_stack_reg (mws->start_regno))
{
bool really_add_notes = debug_insn != 0;