From: Richard Henderson Date: Sun, 10 Mar 2002 23:01:59 +0000 (-0800) Subject: sched-rgn.c (add_branch_dependences): Don't allow insns that throw to move away from... X-Git-Tag: releases/gcc-3.3.0~6558 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d8a083e9c81948217d3a5cb3010d4f6ed910222;p=thirdparty%2Fgcc.git sched-rgn.c (add_branch_dependences): Don't allow insns that throw to move away from the end of the block. * sched-rgn.c (add_branch_dependences): Don't allow insns that throw to move away from the end of the block. From-SVN: r50548 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6d98f862c778..26ee5030c226 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-03-10 Richard Henderson + + * 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 PR preprocessor/5899 diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index e5a241b6327c..20c8d72f77b9 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -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