aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2000-05-11 16:20:31 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2000-05-11 16:20:31 +0200
commitf19c9228fc48df0ca59f7f9b1ba8408f7c145153 (patch)
treee6c0a6564f15c8dad10774af017a4fc028a9790f /gcc/except.c
parent36348eab5d4b9507868787c0a908a3f08d0105a7 (diff)
downloadgcc-f19c9228fc48df0ca59f7f9b1ba8408f7c145153.zip
gcc-f19c9228fc48df0ca59f7f9b1ba8408f7c145153.tar.gz
gcc-f19c9228fc48df0ca59f7f9b1ba8408f7c145153.tar.bz2
except.c (find_exception_handler_labels_1): New function.
* except.c (find_exception_handler_labels_1): New function. (find_exception_handler_labels): Split into two functions, dive into CALL_PLACEHOLDERs when looking for exception handler labels. From-SVN: r33849
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c46
1 files changed, 31 insertions, 15 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 67bbc40..2926b5a 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2388,27 +2388,18 @@ emit_eh_context ()
}
}
-/* Scan the current insns and build a list of handler labels. The
- resulting list is placed in the global variable exception_handler_labels.
+/* Scan the insn chain F and build a list of handler labels. The
+ resulting list is placed in the global variable exception_handler_labels. */
- It is called after the last exception handling region is added to
- the current function (when the rtl is almost all built for the
- current function) and before the jump optimization pass. */
-
-void
-find_exception_handler_labels ()
+static void
+find_exception_handler_labels_1 (f)
+ rtx f;
{
rtx insn;
- exception_handler_labels = NULL_RTX;
-
- /* If we aren't doing exception handling, there isn't much to check. */
- if (! doing_eh (0))
- return;
-
/* For each start of a region, add its label to the list. */
- for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
+ for (insn = f; insn; insn = NEXT_INSN (insn))
{
struct handler_info* ptr;
if (GET_CODE (insn) == NOTE
@@ -2427,9 +2418,34 @@ find_exception_handler_labels ()
ptr->handler_label, exception_handler_labels);
}
}
+ else if (GET_CODE (insn) == CALL_INSN
+ && GET_CODE (PATTERN (insn)) == CALL_PLACEHOLDER)
+ {
+ find_exception_handler_labels_1 (XEXP (PATTERN (insn), 0));
+ find_exception_handler_labels_1 (XEXP (PATTERN (insn), 1));
+ find_exception_handler_labels_1 (XEXP (PATTERN (insn), 2));
+ }
}
}
+/* Scan the current insns and build a list of handler labels. The
+ resulting list is placed in the global variable exception_handler_labels.
+
+ It is called after the last exception handling region is added to
+ the current function (when the rtl is almost all built for the
+ current function) and before the jump optimization pass. */
+void
+find_exception_handler_labels ()
+{
+ exception_handler_labels = NULL_RTX;
+
+ /* If we aren't doing exception handling, there isn't much to check. */
+ if (! doing_eh (0))
+ return;
+
+ find_exception_handler_labels_1 (get_insns ());
+}
+
/* Return a value of 1 if the parameter label number is an exception handler
label. Return 0 otherwise. */