diff options
author | Richard Henderson <rth@redhat.com> | 2004-07-20 15:47:58 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-07-20 15:47:58 -0700 |
commit | 14797075918d654f5af84c932568b9e18613ba39 (patch) | |
tree | f7623cae82fb1fbeb03ddb9092988dee9f6d87c9 /gcc/gimplify.c | |
parent | 40a37b0473df632dc35e34d1060a12e05d4a2110 (diff) | |
download | gcc-14797075918d654f5af84c932568b9e18613ba39.zip gcc-14797075918d654f5af84c932568b9e18613ba39.tar.gz gcc-14797075918d654f5af84c932568b9e18613ba39.tar.bz2 |
gimplify.c (is_gimple_tmp_var): Move to tree-gimple.c.
* gimplify.c (is_gimple_tmp_var): Move to tree-gimple.c.
(gimplify_compound_lval): Use is_gimple_tmp_reg.
* tree-gimple.c (is_gimple_tmp_var): Move from gimplify.c.
(is_gimple_tmp_reg): New.
* tree-gimple.h (is_gimple_tmp_reg): Declare.
From-SVN: r84975
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index e2e8585..f078503 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -476,16 +476,6 @@ get_initialized_tmp_var (tree val, tree *pre_p, tree *post_p) return internal_get_tmp_var (val, pre_p, post_p, false); } -/* Returns true if T is a GIMPLE temporary variable, false otherwise. */ - -bool -is_gimple_tmp_var (tree t) -{ - /* FIXME this could trigger for other local artificials, too. */ - return (TREE_CODE (t) == VAR_DECL && DECL_ARTIFICIAL (t) - && !TREE_STATIC (t) && !DECL_EXTERNAL (t)); -} - /* Declares all the variables in VARS in SCOPE. */ void @@ -1569,7 +1559,7 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p, { TREE_OPERAND (t, 2) = low; tret = gimplify_expr (&TREE_OPERAND (t, 2), pre_p, post_p, - is_gimple_tmp_var, fb_rvalue); + is_gimple_tmp_reg, fb_rvalue); ret = MIN (ret, tret); } } @@ -1588,7 +1578,7 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p, { TREE_OPERAND (t, 3) = elmt_size; tret = gimplify_expr (&TREE_OPERAND (t, 3), pre_p, post_p, - is_gimple_tmp_var, fb_rvalue); + is_gimple_tmp_reg, fb_rvalue); ret = MIN (ret, tret); } } @@ -1610,7 +1600,7 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p, { TREE_OPERAND (t, 2) = offset; tret = gimplify_expr (&TREE_OPERAND (t, 2), pre_p, post_p, - is_gimple_tmp_var, fb_rvalue); + is_gimple_tmp_reg, fb_rvalue); ret = MIN (ret, tret); } } @@ -1641,7 +1631,7 @@ gimplify_compound_lval (tree *expr_p, tree *pre_p, if (!is_gimple_min_invariant (TREE_OPERAND (t, 1))) { tret = gimplify_expr (&TREE_OPERAND (t, 1), pre_p, post_p, - is_gimple_tmp_var, fb_rvalue); + is_gimple_tmp_reg, fb_rvalue); ret = MIN (ret, tret); } } |