diff options
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index d5cd37ce0bd..984913a5fc1 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -447,7 +447,6 @@ static rtx inc_for_reload (rtx, rtx, rtx, int); #ifdef AUTO_INC_DEC static void add_auto_inc_notes (rtx, rtx); #endif -static void copy_eh_notes (rtx, rtx); static void substitute (rtx *, const_rtx, rtx); static bool gen_reload_chain_without_interm_reg_p (int, int); static int reloads_conflict (int, int); @@ -4132,17 +4131,11 @@ static void fixup_eh_region_note (rtx insn, rtx prev, rtx next) { rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX); - rtx i; - if (note == NULL) return; - - if (! may_trap_p (PATTERN (insn))) + if (!insn_could_throw_p (insn)) remove_note (insn, note); - - for (i = NEXT_INSN (prev); i != next; i = NEXT_INSN (i)) - if (INSN_P (i) && i != insn && may_trap_p (PATTERN (i))) - add_reg_note (i, REG_EH_REGION, XEXP (note, 0)); + copy_reg_eh_region_note_forward (note, NEXT_INSN (prev), next); } /* Reload pseudo-registers into hard regs around each insn as needed. @@ -7294,7 +7287,7 @@ emit_input_reload_insns (struct insn_chain *chain, struct reload *rl, } if (flag_non_call_exceptions) - copy_eh_notes (insn, get_insns ()); + copy_reg_eh_region_note_forward (insn, get_insns (), NULL); /* End this sequence. */ *where = get_insns (); @@ -7514,7 +7507,7 @@ emit_output_reload_insns (struct insn_chain *chain, struct reload *rl, output_reload_insns[rl->opnum] = get_insns (); if (flag_non_call_exceptions) - copy_eh_notes (insn, get_insns ()); + copy_reg_eh_region_note_forward (insn, get_insns (), NULL); end_sequence (); } @@ -8890,21 +8883,6 @@ add_auto_inc_notes (rtx insn, rtx x) } #endif -/* Copy EH notes from an insn to its reloads. */ -static void -copy_eh_notes (rtx insn, rtx x) -{ - rtx eh_note = find_reg_note (insn, REG_EH_REGION, NULL_RTX); - if (eh_note) - { - for (; x != 0; x = NEXT_INSN (x)) - { - if (may_trap_p (PATTERN (x))) - add_reg_note (x, REG_EH_REGION, XEXP (eh_note, 0)); - } - } -} - /* This is used by reload pass, that does emit some instructions after abnormal calls moving basic block end, but in fact it wants to emit them on the edge. Looks for abnormal call edges, find backward the |