diff options
author | Roger Sayle <roger@eyesopen.com> | 2004-12-06 17:24:16 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-12-06 17:24:16 +0000 |
commit | b086a2eaf8ae0e915c0db1343687b924c680d2b8 (patch) | |
tree | f74af4b0c552ada8c4014524ef63c52b6957b4be /gcc/gimplify.c | |
parent | ff8b369ad3ebb96866bc3fa10cdeaafc293e1a1c (diff) | |
download | gcc-b086a2eaf8ae0e915c0db1343687b924c680d2b8.zip gcc-b086a2eaf8ae0e915c0db1343687b924c680d2b8.tar.gz gcc-b086a2eaf8ae0e915c0db1343687b924c680d2b8.tar.bz2 |
c-gimplify.c (gimplify_c_loop): Improve initial implementations for loops whose conditions are known at...
* c-gimplify.c (gimplify_c_loop): Improve initial implementations
for loops whose conditions are known at compile-time.
* gimplify.c (append_to_statement_list_1): Remove side_effects
parameter, this function should never be called if its false.
(append_to_statement_list): Only call append_to_statement_list_1
if t is non-NULL tree with side-effects.
(append_to_statement_list_force): Likewise, if t is not NULL.
From-SVN: r91784
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 6a9e3b1..41814a7 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -214,17 +214,14 @@ gimple_pop_condition (tree *pre_p) } } -/* A subroutine of append_to_statement_list{,_force}. */ +/* A subroutine of append_to_statement_list{,_force}. T is not NULL. */ static void -append_to_statement_list_1 (tree t, tree *list_p, bool side_effects) +append_to_statement_list_1 (tree t, tree *list_p) { tree list = *list_p; tree_stmt_iterator i; - if (!side_effects) - return; - if (!list) { if (t && TREE_CODE (t) == STATEMENT_LIST) @@ -245,7 +242,8 @@ append_to_statement_list_1 (tree t, tree *list_p, bool side_effects) void append_to_statement_list (tree t, tree *list_p) { - append_to_statement_list_1 (t, list_p, t ? TREE_SIDE_EFFECTS (t) : false); + if (t && TREE_SIDE_EFFECTS (t)) + append_to_statement_list_1 (t, list_p); } /* Similar, but the statement is always added, regardless of side effects. */ @@ -253,7 +251,8 @@ append_to_statement_list (tree t, tree *list_p) void append_to_statement_list_force (tree t, tree *list_p) { - append_to_statement_list_1 (t, list_p, t != NULL); + if (t != NULL_TREE) + append_to_statement_list_1 (t, list_p); } /* Both gimplify the statement T and append it to LIST_P. */ |