summaryrefslogtreecommitdiffstats
path: root/gcc/except.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-20 00:49:13 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-20 00:49:13 +0000
commit7cb6ef9cb9d0e20a63da12d8a976db77d38c5e39 (patch)
tree8fe10615c6c1ebde7f73b98b8f2e1d6797bb0b38 /gcc/except.c
parent0b5e8ccdc811e7a1d5360e2f47d40363a8a77c3e (diff)
downloadppe42-gcc-7cb6ef9cb9d0e20a63da12d8a976db77d38c5e39.tar.gz
ppe42-gcc-7cb6ef9cb9d0e20a63da12d8a976db77d38c5e39.zip
* except.c (current_function_has_exception_handlers): New.
* except.h: Declare it. * sibcall.c (optimize_sibling_and_tail_recursive_call): Use it. Combine tests that disable all sibcalls for the function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51054 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 939610ffc1f..fa92368ec8d 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1401,6 +1401,23 @@ find_exception_handler_labels ()
exception_handler_labels = list;
}
+bool
+current_function_has_exception_handlers ()
+{
+ int i;
+
+ for (i = cfun->eh->last_region_number; i > 0; --i)
+ {
+ struct eh_region *region = cfun->eh->region_array[i];
+
+ if (! region || region->region_number != i)
+ continue;
+ if (region->type != ERT_THROW)
+ return true;
+ }
+
+ return false;
+}
static struct eh_region *
duplicate_eh_region_1 (o, map)
OpenPOWER on IntegriCloud