aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-10-31 11:32:02 +0000
committerJeff Law <law@gcc.gnu.org>1998-10-31 04:32:02 -0700
commit18f3f864d38d18ffbdfdbc2e7f3c75b06d101565 (patch)
treedb41ab1fea7ff239a47bc4fcb9f89ba400f3d069
parent21af493bcded59ae22f6c5d54d1f3ce1aa97d2f7 (diff)
downloadgcc-18f3f864d38d18ffbdfdbc2e7f3c75b06d101565.zip
gcc-18f3f864d38d18ffbdfdbc2e7f3c75b06d101565.tar.gz
gcc-18f3f864d38d18ffbdfdbc2e7f3c75b06d101565.tar.bz2
jump.c (jump_optimize): Initialize mappings from INSN_UID to EH region if...
* jump.c (jump_optimize): Initialize mappings from INSN_UID to EH region if exceptions are enabled and we're performing cross jump optimizations. (find_cross_jump): Exit loop if the insns are in different EH regions. From-SVN: r23475
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/jump.c13
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 248bf0e..4b89ef3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Sat Oct 31 12:30:02 1998 Jeffrey A Law (law@cygnus.com)
+
+ * jump.c (jump_optimize): Initialize mappings from INSN_UID to
+ EH region if exceptions are enabled and we're performing cross
+ jump optimizations.
+ (find_cross_jump): Exit loop if the insns are in different EH regions.
+
Sat Oct 31 10:02:48 1998 Mark Mitchell <mark@markmitchell.com>
* dwarf2out.c (output_call_frame_info): Use
diff --git a/gcc/jump.c b/gcc/jump.c
index 9748fb2..18696ec 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -182,6 +182,12 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
max_uid++;
+ /* If we are performing cross jump optimizations, then initialize
+ tables mapping UIDs to EH regions to avoid incorrect movement
+ of insns from one EH region to another. */
+ if (flag_exceptions && cross_jump)
+ init_insn_eh_region (f, max_uid);
+
/* Delete insns following barriers, up to next label. */
for (insn = f; insn;)
@@ -2715,6 +2721,13 @@ find_cross_jump (e1, e2, minimum, f1, f2)
if (i2 == 0 || GET_CODE (i1) != GET_CODE (i2))
break;
+ /* Avoid moving insns across EH regions if either of the insns
+ can throw. */
+ if (flag_exceptions
+ && (asynchronous_exceptions || GET_CODE (i1) == CALL_INSN)
+ && !in_same_eh_region (i1, i2))
+ break;
+
p1 = PATTERN (i1);
p2 = PATTERN (i2);