cfgrtl.c (purge_dead_edges): Fix handling of EH edges.
* cfgrtl.c (purge_dead_edges): Fix handling of EH edges. * i386.h (CONDITIONAL_REGISTER_USAGE): Do not write to PIC_OFFSET_TABLE_REGNUM when it is INVALID_REGNUM From-SVN: r50128
This commit is contained in:
parent
38c1593d57
commit
70da1d030d
|
@ -1,3 +1,10 @@
|
|||
Don Feb 28 11:24:30 CET 2002 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* cfgrtl.c (purge_dead_edges): Fix handling of EH edges.
|
||||
|
||||
* i386.h (CONDITIONAL_REGISTER_USAGE): Do not write to
|
||||
PIC_OFFSET_TABLE_REGNUM when it is INVALID_REGNUM
|
||||
|
||||
Don Feb 28 11:07:36 CET 2002 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* basic-block.h (BB_REACHABLE): Renumber.
|
||||
|
|
52
gcc/cfgrtl.c
52
gcc/cfgrtl.c
|
@ -1899,9 +1899,30 @@ purge_dead_edges (bb)
|
|||
rtx insn = bb->end, note;
|
||||
bool purged = false;
|
||||
|
||||
/* ??? This makes no sense since the later test includes more cases. */
|
||||
if (GET_CODE (insn) == JUMP_INSN && !simplejump_p (insn))
|
||||
return false;
|
||||
/* If this instruction cannot trap, remove REG_EH_REGION notes. */
|
||||
if (GET_CODE (insn) == INSN
|
||||
&& (note = find_reg_note (insn, REG_EH_REGION, NULL)))
|
||||
{
|
||||
rtx eqnote;
|
||||
|
||||
if (! may_trap_p (PATTERN (insn))
|
||||
|| ((eqnote = find_reg_equal_equiv_note (insn))
|
||||
&& ! may_trap_p (XEXP (eqnote, 0))))
|
||||
remove_note (insn, note);
|
||||
}
|
||||
|
||||
/* Cleanup abnormal edges caused by throwing insns that have been
|
||||
eliminated. */
|
||||
if (! can_throw_internal (bb->end))
|
||||
for (e = bb->succ; e; e = next)
|
||||
{
|
||||
next = e->succ_next;
|
||||
if (e->flags & EDGE_EH)
|
||||
{
|
||||
remove_edge (e);
|
||||
purged = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (GET_CODE (insn) == JUMP_INSN)
|
||||
{
|
||||
|
@ -1970,31 +1991,6 @@ purge_dead_edges (bb)
|
|||
return purged;
|
||||
}
|
||||
|
||||
/* If this instruction cannot trap, remove REG_EH_REGION notes. */
|
||||
if (GET_CODE (insn) == INSN
|
||||
&& (note = find_reg_note (insn, REG_EH_REGION, NULL)))
|
||||
{
|
||||
rtx eqnote;
|
||||
|
||||
if (! may_trap_p (PATTERN (insn))
|
||||
|| ((eqnote = find_reg_equal_equiv_note (insn))
|
||||
&& ! may_trap_p (XEXP (eqnote, 0))))
|
||||
remove_note (insn, note);
|
||||
}
|
||||
|
||||
/* Cleanup abnormal edges caused by throwing insns that have been
|
||||
eliminated. */
|
||||
if (! can_throw_internal (bb->end))
|
||||
for (e = bb->succ; e; e = next)
|
||||
{
|
||||
next = e->succ_next;
|
||||
if (e->flags & EDGE_EH)
|
||||
{
|
||||
remove_edge (e);
|
||||
purged = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we don't see a jump insn, we don't know exactly why the block would
|
||||
have been broken at this point. Look for a simple, non-fallthru edge,
|
||||
as these are only created by conditional branches. If we find such an
|
||||
|
|
|
@ -957,7 +957,7 @@ do { \
|
|||
call_used_regs[i] = (call_used_regs[i] \
|
||||
& (TARGET_64BIT ? 2 : 1)) != 0; \
|
||||
} \
|
||||
if (flag_pic) \
|
||||
if (flag_pic && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) \
|
||||
{ \
|
||||
fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
|
||||
call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
|
||||
|
|
Loading…
Reference in New Issue