re PR rtl-optimization/50764 (ICE: in maybe_record_trace_start, at dwarf2cfi.c:2243...
authorTom de Vries <tom@codesourcery.com>
Tue, 22 Nov 2011 20:55:01 +0000 (20:55 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Tue, 22 Nov 2011 20:55:01 +0000 (20:55 +0000)
2011-11-22  Tom de Vries  <tom@codesourcery.com>

PR rtl-optimization/50764
* sched-deps.c (sched_analyze_insn): Make sure frame-related insns are
not moved past preceding jump.

From-SVN: r181639

gcc/ChangeLog
gcc/sched-deps.c

index df9389119fbf497356ca9a8ac16575d9f2ab138c..4c7eca4d7d996b0b97b022ae2731ff48926b0e2d 100644 (file)
@@ -1,3 +1,9 @@
+2011-11-22  Tom de Vries  <tom@codesourcery.com>
+
+       PR rtl-optimization/50764
+       * sched-deps.c (sched_analyze_insn): Make sure frame-related insns are
+       not moved past preceding jump.
+
 2011-11-22  Jeff Law  <law@redhat.com>
 
        * doc/contrib.texi: Add entry for David Binderman.
index a778721d20b2fe0930538d505b5561970d937c68..043204a34bc801cbc5f42f120e94b03af57e2d60 100644 (file)
@@ -2812,8 +2812,14 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn)
      during prologue generation and avoid marking the frame pointer setup
      as frame-related at all.  */
   if (RTX_FRAME_RELATED_P (insn))
-    deps->sched_before_next_jump
-      = alloc_INSN_LIST (insn, deps->sched_before_next_jump);
+    {
+      /* Make sure prologue insn is scheduled before next jump.  */
+      deps->sched_before_next_jump
+       = alloc_INSN_LIST (insn, deps->sched_before_next_jump);
+
+      /* Make sure epilogue insn is scheduled after preceding jumps.  */
+      add_dependence_list (insn, deps->pending_jump_insns, 1, REG_DEP_ANTI);
+    }
 
   if (code == COND_EXEC)
     {