diff options
author | Jeffrey A Law <law@cygnus.com> | 1998-10-30 23:41:35 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-10-30 16:41:35 -0700 |
commit | 987fbe99b44ff51b607ab745d153afa517a1ccaf (patch) | |
tree | c02446e13a371d98f86f62de26af0e0980ec4f4c | |
parent | b98e367abbc7a8e8f39ad9fe14b7ae9adc690360 (diff) |
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: r23462
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/jump.c | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a9cf10039d..52b97012556 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Sat Oct 31 00:40:05 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. + Fri Oct 30 00:54:25 1998 Peter Jakubek <pjak@snafu.de> * m68k.h (INDIRECTABLE_1_ADDRESS_P): Fix thinko. diff --git a/gcc/jump.c b/gcc/jump.c index dfc4ae64c3e..ad728a0b513 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;) @@ -2708,6 +2714,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. + + ??? This is only necessary if i1 or i2 can throw an exception. */ + if (flag_exceptions + && !in_same_eh_region (i1, i2)) + break; + p1 = PATTERN (i1); p2 = PATTERN (i2); |