aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2014-06-30 21:30:52 +0200
committerUros Bizjak <uros@gcc.gnu.org>2014-06-30 21:30:52 +0200
commita4a51a5262b8a12475fd7811dac3fd05f02886ce (patch)
treecf5d008b99533b789a9ab08b5f2b935cabf526b3 /gcc/except.c
parent5acd5cf07262141100da18e8dc227ed4e073ac8c (diff)
downloadgcc-a4a51a5262b8a12475fd7811dac3fd05f02886ce.zip
gcc-a4a51a5262b8a12475fd7811dac3fd05f02886ce.tar.gz
gcc-a4a51a5262b8a12475fd7811dac3fd05f02886ce.tar.bz2
except.c (emit_note_eh_region_end): New helper function.
* except.c (emit_note_eh_region_end): New helper function. (convert_to_eh_region_ranges): Use emit_note_eh_region_end to emit EH_REGION_END note. * jump.c (cleanup_barriers): Do not split a call and its corresponding CALL_ARG_LOCATION note. From-SVN: r212171
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/gcc/except.c b/gcc/except.c
index dc5c1d2..7ac114f 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2466,6 +2466,20 @@ add_call_site (rtx landing_pad, int action, int section)
return call_site_base + crtl->eh.call_site_record_v[section]->length () - 1;
}
+static rtx
+emit_note_eh_region_end (rtx insn)
+{
+ rtx next = NEXT_INSN (insn);
+
+ /* Make sure we do not split a call and its corresponding
+ CALL_ARG_LOCATION note. */
+ if (next && NOTE_P (next)
+ && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
+ insn = next;
+
+ return emit_note_after (NOTE_INSN_EH_REGION_END, insn);
+}
+
/* Turn REG_EH_REGION notes back into NOTE_INSN_EH_REGION notes.
The new note numbers will not refer to region numbers, but
instead to call site entries. */
@@ -2544,8 +2558,8 @@ convert_to_eh_region_ranges (void)
note = emit_note_before (NOTE_INSN_EH_REGION_BEG,
first_no_action_insn_before_switch);
NOTE_EH_HANDLER (note) = call_site;
- note = emit_note_after (NOTE_INSN_EH_REGION_END,
- last_no_action_insn_before_switch);
+ note
+ = emit_note_eh_region_end (last_no_action_insn_before_switch);
NOTE_EH_HANDLER (note) = call_site;
gcc_assert (last_action != -3
|| (last_action_insn
@@ -2569,8 +2583,7 @@ convert_to_eh_region_ranges (void)
first_no_action_insn = NULL_RTX;
}
- note = emit_note_after (NOTE_INSN_EH_REGION_END,
- last_action_insn);
+ note = emit_note_eh_region_end (last_action_insn);
NOTE_EH_HANDLER (note) = call_site;
}
@@ -2617,7 +2630,7 @@ convert_to_eh_region_ranges (void)
if (last_action >= -1 && ! first_no_action_insn)
{
- note = emit_note_after (NOTE_INSN_EH_REGION_END, last_action_insn);
+ note = emit_note_eh_region_end (last_action_insn);
NOTE_EH_HANDLER (note) = call_site;
}