Commit 53e782e5 by Andrew Pinski Committed by Andrew Pinski

revert: re PR middle-end/17967 (Expand is considered slower?…

revert: re PR middle-end/17967 (Expand is considered slower? (remove_useless_stmts is considered part of expand))

2004-10-14  Andrew Pinski  <pinskia@physics.uc.edu>

        Revert:
        2004-10-14  Andrew Pinski  <pinskia@physics.uc.edu>
        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: r89080
parent d2ab3e37
2004-10-14 Andrew Pinski <pinskia@physics.uc.edu>
Revert:
2004-10-14 Andrew Pinski <pinskia@physics.uc.edu>
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 David Edelsohn <edelsohn@gnu.org> 2004-10-14 David Edelsohn <edelsohn@gnu.org>
* configure.ac: Add .machine power4 directive when testing for * configure.ac: Add .machine power4 directive when testing for
......
...@@ -1204,6 +1204,7 @@ remove_useless_stmts_cond (tree *stmt_p, struct rus_data *data) ...@@ -1204,6 +1204,7 @@ remove_useless_stmts_cond (tree *stmt_p, struct rus_data *data)
else_has_label = data->has_label; else_has_label = data->has_label;
data->has_label = save_has_label | then_has_label | else_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); then_clause = COND_EXPR_THEN (*stmt_p);
else_clause = COND_EXPR_ELSE (*stmt_p); else_clause = COND_EXPR_ELSE (*stmt_p);
cond = COND_EXPR_COND (*stmt_p); cond = COND_EXPR_COND (*stmt_p);
...@@ -1551,11 +1552,13 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) ...@@ -1551,11 +1552,13 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data)
break; break;
case RETURN_EXPR: case RETURN_EXPR:
fold_stmt (tp);
data->last_goto = NULL; data->last_goto = NULL;
data->may_branch = true; data->may_branch = true;
break; break;
case CALL_EXPR: case CALL_EXPR:
fold_stmt (tp);
data->last_goto = NULL; data->last_goto = NULL;
notice_special_calls (t); notice_special_calls (t);
update_call_expr_flags (t); update_call_expr_flags (t);
...@@ -1565,6 +1568,7 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) ...@@ -1565,6 +1568,7 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data)
case MODIFY_EXPR: case MODIFY_EXPR:
data->last_goto = NULL; data->last_goto = NULL;
fold_stmt (tp);
op = get_call_expr_in (t); op = get_call_expr_in (t);
if (op) if (op)
{ {
...@@ -1600,6 +1604,10 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data) ...@@ -1600,6 +1604,10 @@ remove_useless_stmts_1 (tree *tp, struct rus_data *data)
} }
} }
break; break;
case SWITCH_EXPR:
fold_stmt (tp);
data->last_goto = NULL;
break;
default: default:
data->last_goto = NULL; data->last_goto = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment