aboutsummaryrefslogtreecommitdiff
path: root/gcc/jump.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/jump.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/jump.c')
-rw-r--r--gcc/jump.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index 9418f65..a5e5f52 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -121,15 +121,26 @@ rebuild_jump_labels_chain (rtx chain)
static unsigned int
cleanup_barriers (void)
{
- rtx insn, next, prev;
- for (insn = get_insns (); insn; insn = next)
+ rtx insn;
+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
{
- next = NEXT_INSN (insn);
if (BARRIER_P (insn))
{
- prev = prev_nonnote_insn (insn);
+ rtx prev = prev_nonnote_insn (insn);
if (!prev)
continue;
+
+ if (CALL_P (prev))
+ {
+ /* Make sure we do not split a call and its corresponding
+ CALL_ARG_LOCATION note. */
+ rtx next = NEXT_INSN (prev);
+
+ if (NOTE_P (next)
+ && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
+ prev = next;
+ }
+
if (BARRIER_P (prev))
delete_insn (insn);
else if (prev != PREV_INSN (insn))