diff options
author | Richard Henderson <rth@redhat.com> | 2002-03-19 16:49:13 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-03-19 16:49:13 -0800 |
commit | 93f82d608075a6d97a8064550286cb059d730667 (patch) | |
tree | 8fe10615c6c1ebde7f73b98b8f2e1d6797bb0b38 /gcc/except.c | |
parent | ed4fbfa016afc1ea8e340e2370416fd2ca9c21c6 (diff) | |
download | gcc-93f82d608075a6d97a8064550286cb059d730667.zip gcc-93f82d608075a6d97a8064550286cb059d730667.tar.gz gcc-93f82d608075a6d97a8064550286cb059d730667.tar.bz2 |
except.c (current_function_has_exception_handlers): New.
* 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.
From-SVN: r51054
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c index 939610f..fa92368 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) |