egcs-1.1.1 issues
Jeffrey A Law
law@cygnus.com
Fri Oct 30 23:41:00 GMT 1998
In message <m0zZ41Y-0000V4C@sea.lucon.org>you write:
> Ooops. How about this one?
>
> Thanks.
>
> --
> H.J. Lu (hjl@gnu.org)
> ---
> Thu Oct 29 18:09:05 1998 H.J. Lu <hjl@gnu.org>
>
> * jump.c (find_cross_jump): Don't do cross jump if 2 INSNs are
> in differeten EH regions.
How about this instead. Simpler & faster. Fixes the 3 bug reports I can
find on this problem. I'll check a less conservative version into the
mainline tree.
* 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.
Index: jump.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/jump.c,v
retrieving revision 1.34.2.1
diff -c -3 -p -r1.34.2.1 jump.c
*** jump.c 1998/07/21 05:03:40 1.34.2.1
--- jump.c 1998/10/31 07:36:42
*************** jump_optimize (f, cross_jump, noop_moves
*** 182,187 ****
--- 182,193 ----
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;)
*************** find_cross_jump (e1, e2, minimum, f1, f2
*** 2706,2711 ****
--- 2712,2724 ----
}
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);
More information about the Gcc-patches
mailing list