]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sched-rgn.c (add_branch_dependences): Don't allow insns that throw to move away from...
authorRichard Henderson <rth@redhat.com>
Sun, 10 Mar 2002 23:01:59 +0000 (15:01 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 10 Mar 2002 23:01:59 +0000 (15:01 -0800)
        * sched-rgn.c (add_branch_dependences): Don't allow insns that throw
        to move away from the end of the block.

From-SVN: r50548

gcc/ChangeLog
gcc/sched-rgn.c

index 6d98f862c778c9ff07185fae8f651c9dcd6c5648..26ee5030c22656c187a200ded0a26e05a5556ece 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-10  Richard Henderson  <rth@redhat.com>
+
+       * sched-rgn.c (add_branch_dependences): Don't allow insns that throw
+       to move away from the end of the block.
+
 2002-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        PR preprocessor/5899
index e5a241b6327cd99b25134cc865fd49b9a8535fa5..20c8d72f77b99d97cb0183b8a5f45713bcece01b 100644 (file)
@@ -2277,10 +2277,10 @@ add_branch_dependences (head, tail)
 {
   rtx insn, last;
 
-  /* For all branches, calls, uses, clobbers, and cc0 setters, force them
-     to remain in order at the end of the block by adding dependencies and
-     giving the last a high priority.  There may be notes present, and
-     prev_head may also be a note.
+  /* For all branches, calls, uses, clobbers, cc0 setters, and instructions
+     that can throw exceptions, force them to remain in order at the end of
+     the block by adding dependencies and giving the last a high priority.
+     There may be notes present, and prev_head may also be a note.
 
      Branches must obviously remain at the end.  Calls should remain at the
      end since moving them results in worse register allocation.  Uses remain
@@ -2293,6 +2293,7 @@ add_branch_dependences (head, tail)
         || (GET_CODE (insn) == INSN
             && (GET_CODE (PATTERN (insn)) == USE
                 || GET_CODE (PATTERN (insn)) == CLOBBER
+                || can_throw_internal (insn)
 #ifdef HAVE_cc0
                 || sets_cc0_p (PATTERN (insn))
 #endif