sh.c (find_barrier): Don't emit a constant pool between a call and its corresponding...
authorKaz Kojima <kkojima@gcc.gnu.org>
Sat, 19 Mar 2011 23:22:18 +0000 (23:22 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Sat, 19 Mar 2011 23:22:18 +0000 (23:22 +0000)
* config/sh/sh.c (find_barrier): Don't emit a constant pool
between a call and its corresponding CALL_ARG_LOCATION note.

From-SVN: r171185

gcc/ChangeLog
gcc/config/sh/sh.c

index bf32ebb9e50c7e93676cc6460582d1c6f93261a3..87fb0337ecd78815fd3a6330b12eb4859715d124 100644 (file)
@@ -1,3 +1,9 @@
+2011-03-19  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       PR debug/48178
+       * config/sh/sh.c (find_barrier): Don't emit a constant pool
+       between a call and its corresponding CALL_ARG_LOCATION note.
+
 2011-03-19  Anatoly Sokolov  <aesok@post.ru>
 
        * cfgcleanup.c (mark_effect): Use bitmap_set_range/bitmap_clear_range
index 18bd9642f7bd467cd342d289c36f57fd93372532..fc739dd4f42de0b17c657030d7c643e01430741a 100644 (file)
@@ -4876,6 +4876,16 @@ find_barrier (int num_mova, rtx mova, rtx from)
             || LABEL_P (from))
        from = PREV_INSN (from);
 
+      /* Make sure we do not split between a call and its corresponding
+        CALL_ARG_LOCATION note.  */
+      if (CALL_P (from))
+       {
+         rtx next = NEXT_INSN (from);
+         if (next && NOTE_P (next)
+             && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
+           from = next;
+       }
+
       from = emit_jump_insn_after (gen_jump (label), from);
       JUMP_LABEL (from) = label;
       LABEL_NUSES (label) = 1;