From 4965c1630ef510db74c8e167f65703d1947870a1 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Thu, 14 Oct 2004 22:00:04 +0000 Subject: [PATCH] re PR middle-end/17967 (Expand is considered slower? (remove_useless_stmts is considered part of expand)) 2004-10-14 Andrew Pinski PR middle-end/17967 Revert: * tree-cfg.c (remove_usless_stmts_cond): Fold statement. (remove_useless_stmts_1): Fold trees we know how to fold. From-SVN: r89057 --- gcc/ChangeLog | 7 +++++++ gcc/tree-cfg.c | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a10096f447..d36603a7228 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-10-14 Andrew Pinski + + PR middle-end/17967 + Revert: + * tree-cfg.c (remove_usless_stmts_cond): Fold statement. + (remove_useless_stmts_1): Fold trees we know how to fold. + 2004-10-14 Joseph S. Myers * config/rs6000/eabispe.h (SUBSUBTARGET_OVERRIDE_OPTIONS), diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 293b24e1957..2986e315d4b 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -1204,7 +1204,6 @@ remove_useless_stmts_cond (tree *stmt_p, struct rus_data *data) else_has_label = data->has_label; data->has_label = save_has_label | then_has_label | else_has_label; - fold_stmt (stmt_p); then_clause = COND_EXPR_THEN (*stmt_p); else_clause = COND_EXPR_ELSE (*stmt_p); cond = COND_EXPR_COND (*stmt_p); @@ -1552,13 +1551,11 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) break; case RETURN_EXPR: - fold_stmt (tp); data->last_goto = NULL; data->may_branch = true; break; case CALL_EXPR: - fold_stmt (tp); data->last_goto = NULL; notice_special_calls (t); update_call_expr_flags (t); @@ -1568,7 +1565,6 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) case MODIFY_EXPR: data->last_goto = NULL; - fold_stmt (tp); op = get_call_expr_in (t); if (op) { @@ -1604,10 +1600,6 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) } } break; - case SWITCH_EXPR: - fold_stmt (tp); - data->last_goto = NULL; - break; default: data->last_goto = NULL;