aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-03-10 15:01:59 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-03-10 15:01:59 -0800
commit8d8a083e9c81948217d3a5cb3010d4f6ed910222 (patch)
treed0b4332250c090c621b3e27d56fe20bf0b378c4e /gcc
parent32810ba3df092f3890cb115a162a82afec947966 (diff)
downloadgcc-8d8a083e9c81948217d3a5cb3010d4f6ed910222.zip
gcc-8d8a083e9c81948217d3a5cb3010d4f6ed910222.tar.gz
gcc-8d8a083e9c81948217d3a5cb3010d4f6ed910222.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/sched-rgn.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d98f86..26ee503 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index e5a241b..20c8d72 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