aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorDavid Li <davidxl@google.com>2011-06-09 22:49:12 +0000
committerDavid Li <davidxl@google.com>2011-06-09 22:49:12 +0000
commit713623472a519a55d1e74c256ffb394f05afd5d9 (patch)
tree90db0a19c995b30c6d8bb39190ca384e0d63716e /gcc/tree-eh.c
parent225233010a55c33c22852bd2c12d5350833b73a7 (diff)
Revert r174848,174849
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174864 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 7d27e0c90a7..e87c32e798b 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -3234,9 +3234,6 @@ execute_lower_eh_dispatch (void)
bool any_rewritten = false;
bool redirected = false;
- if (cfun->eh->region_tree == NULL)
- return 0;
-
assign_filter_values ();
FOR_EACH_BB (bb)
@@ -3257,7 +3254,7 @@ execute_lower_eh_dispatch (void)
static bool
gate_lower_eh_dispatch (void)
{
- return true;
+ return cfun->eh->region_tree != NULL;
}
struct gimple_opt_pass pass_lower_eh_dispatch =
@@ -3986,12 +3983,8 @@ execute_cleanup_eh_1 (void)
static unsigned int
execute_cleanup_eh (void)
{
- int ret;
+ int ret = execute_cleanup_eh_1 ();
- if (cfun->eh == NULL || cfun->eh->region_tree == NULL)
- return 0;
-
- ret = execute_cleanup_eh_1 ();
/* If the function no longer needs an EH personality routine
clear it. This exposes cross-language inlining opportunities
and avoids references to a never defined personality routine. */
@@ -4005,7 +3998,7 @@ execute_cleanup_eh (void)
static bool
gate_cleanup_eh (void)
{
- return true;
+ return cfun->eh != NULL && cfun->eh->region_tree != NULL;
}
struct gimple_opt_pass pass_cleanup_eh = {