aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1996-07-23 20:03:47 +0000
committerMike Stump <mrs@gcc.gnu.org>1996-07-23 20:03:47 +0000
commit6adb4e3a29c612cc99a26a54364917e3a1709e8c (patch)
treed1acdc1258bb390e198f2a31596603f8e267eacf /gcc/loop.c
parent3d1953912dca5809d9e37fccd9ee606d5b637dc4 (diff)
downloadgcc-6adb4e3a29c612cc99a26a54364917e3a1709e8c.zip
gcc-6adb4e3a29c612cc99a26a54364917e3a1709e8c.tar.gz
gcc-6adb4e3a29c612cc99a26a54364917e3a1709e8c.tar.bz2
install EH code
From-SVN: r12549
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 4ac5d76..f4670fd 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -47,6 +47,7 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "real.h"
#include "loop.h"
+#include "except.h"
/* Vector mapping INSN_UIDs to luids.
The luids are like uids but increase monotonically always.
@@ -2290,6 +2291,19 @@ find_and_verify_loops (f)
loop_invalid[loop_num] = 1;
}
+ /* Any loop containing a label used for an exception handler must be
+ invalidated, because it can be jumped into from anywhere. */
+
+ for (label = exception_handler_labels; label; label = XEXP (label, 1))
+ {
+ int loop_num;
+
+ for (loop_num = uid_loop_num[INSN_UID (XEXP (label, 0))];
+ loop_num != -1;
+ loop_num = loop_outer_loop[loop_num])
+ loop_invalid[loop_num] = 1;
+ }
+
/* Now scan all insn's in the function. If any JUMP_INSN branches into a
loop that it is not contained within, that loop is marked invalid.
If any INSN or CALL_INSN uses a label's address, then the loop containing