diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-06-25 03:46:30 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-06-24 23:46:30 -0400 |
commit | fff34d356a721134207d6545fc134a412af8f885 (patch) | |
tree | 0ced8c74747bef5dcab5eaebad0dd4ca71da5d12 | |
parent | 77db1f411d9b7d9cf865b119ea09aadc92238a81 (diff) | |
download | gcc-fff34d356a721134207d6545fc134a412af8f885.zip gcc-fff34d356a721134207d6545fc134a412af8f885.tar.gz gcc-fff34d356a721134207d6545fc134a412af8f885.tar.bz2 |
c-gimplify.c (gimplify_for_stmt): Use gimplify_and_add.
* c-gimplify.c (gimplify_for_stmt): Use gimplify_and_add.
* gimplify.c (internal_get_tmp_var, gimplify_return_expr): Likewise.
(gimplify_loop_expr, gimplify_init_constructor): Likewise.
(gimplify_self_mod_expr, gimplify_cond_expr): Likewise.
From-SVN: r83634
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-gimplify.c | 6 | ||||
-rw-r--r-- | gcc/gimplify.c | 22 |
3 files changed, 16 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d02cd05..2b70609 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2004-06-24 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + * c-gimplify.c (gimplify_for_stmt): Use gimplify_and_add. + * gimplify.c (internal_get_tmp_var, gimplify_return_expr): Likewise. + (gimplify_loop_expr, gimplify_init_constructor): Likewise. + (gimplify_self_mod_expr, gimplify_cond_expr): Likewise. + PR/16131 * gimplify.c (voidify_wrapper_expr): Allow TARGET_EXPR. diff --git a/gcc/c-gimplify.c b/gcc/c-gimplify.c index 44af046..811365e 100644 --- a/gcc/c-gimplify.c +++ b/gcc/c-gimplify.c @@ -411,10 +411,8 @@ gimplify_for_stmt (tree *stmt_p, tree *pre_p) tree stmt = *stmt_p; if (FOR_INIT_STMT (stmt)) - { - gimplify_stmt (&FOR_INIT_STMT (stmt)); - append_to_statement_list (FOR_INIT_STMT (stmt), pre_p); - } + gimplify_and_add (FOR_INIT_STMT (stmt), pre_p); + *stmt_p = gimplify_c_loop (FOR_COND (stmt), FOR_BODY (stmt), FOR_EXPR (stmt), 1); diff --git a/gcc/gimplify.c b/gcc/gimplify.c index b482ffa..a7960fd 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -456,10 +456,9 @@ internal_get_tmp_var (tree val, tree *pre_p, tree *post_p, bool is_formal) SET_EXPR_LOCUS (mod, EXPR_LOCUS (val)); else annotate_with_locus (mod, input_location); - /* gimplify_modify_expr might want to reduce this further. */ - gimplify_stmt (&mod); - append_to_statement_list (mod, pre_p); + /* gimplify_modify_expr might want to reduce this further. */ + gimplify_and_add (mod, pre_p); return t; } @@ -990,8 +989,8 @@ gimplify_return_expr (tree stmt, tree *pre_p) Then gimplify the whole thing. */ if (result != result_decl) TREE_OPERAND (ret_expr, 0) = result; - gimplify_stmt (&TREE_OPERAND (stmt, 0)); - append_to_statement_list (TREE_OPERAND (stmt, 0), pre_p); + + gimplify_and_add (TREE_OPERAND (stmt, 0), pre_p); /* If we didn't use a temporary, then the result is just the result_decl. Otherwise we need a simple copy. This should already be gimple. */ @@ -1019,8 +1018,7 @@ gimplify_loop_expr (tree *expr_p, tree *pre_p) gimplify_ctxp->exit_label = NULL_TREE; - gimplify_stmt (&LOOP_EXPR_BODY (*expr_p)); - append_to_statement_list (LOOP_EXPR_BODY (*expr_p), pre_p); + gimplify_and_add (LOOP_EXPR_BODY (*expr_p), pre_p); if (gimplify_ctxp->exit_label) { @@ -1447,9 +1445,9 @@ gimplify_init_constructor (tree *expr_p, tree *pre_p, purpose, NULL_TREE); init = build (MODIFY_EXPR, TREE_TYPE (purpose), cref, value); + /* Each member initialization is a full-expression. */ - gimplify_stmt (&init); - append_to_statement_list (init, pre_p); + gimplify_and_add (init, pre_p); } *expr_p = NULL_TREE; @@ -2022,8 +2020,7 @@ gimplify_self_mod_expr (tree *expr_p, tree *pre_p, tree *post_p, if (postfix) { - gimplify_stmt (&t1); - append_to_statement_list (t1, post_p); + gimplify_and_add (t1, post_p); *expr_p = lhs; return GS_ALL_DONE; } @@ -2475,8 +2472,7 @@ gimplify_cond_expr (tree *expr_p, tree *pre_p, tree target) recalculate_side_effects (expr); /* Move the COND_EXPR to the prequeue and use the temp in its place. */ - gimplify_stmt (&expr); - append_to_statement_list (expr, pre_p); + gimplify_and_add (expr, pre_p); *expr_p = tmp; return ret; |