aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-05-14 15:27:37 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-05-14 08:27:37 -0700
commit571325db5977ad68205f88d6e4d86b1ffaeaaeec (patch)
tree045c5d0ec64afc180b33c76ab77d652bb726157b /gcc/tree-sra.c
parenta2f0e34d9ecd47343f8cdcc78841de15a7e5b2c0 (diff)
downloadgcc-571325db5977ad68205f88d6e4d86b1ffaeaaeec.zip
gcc-571325db5977ad68205f88d6e4d86b1ffaeaaeec.tar.gz
gcc-571325db5977ad68205f88d6e4d86b1ffaeaaeec.tar.bz2
re PR tree-optimization/14466 (missed PHI optimization (different types))
2004-05-14 Andrew Pinski <pinskia@physics.uc.edu> PR optimization/14466 * tree-complex.c (make_temp): Remove. (gimplify_val): Replace make_temp with make_rename_temp and add NULL as the second argument. (expand_complex_div_wide): Likewise. * tree-dfa.c (make_rename_temp): New function. * tree-flow.h (make_rename_temp): Declare. * tree-sra.c (make_temp): Remove. (lookup_scalar): Replace make_temp with make_rename_temp. (create_scalar_copies): Likewise. * tree-ssa-phiopt.c (conditional_replacement): When we get non gimple create a temporary variable to hold the casted expression. 2004-05-14 Andrew Pinski <pinskia@physics.uc.edu> PR optimization/14466 * gcc.dg/tree-ssa/20040514-1.c: New test. From-SVN: r81847
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index d447b82..46a3c59 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -112,17 +112,6 @@ sra_elt_eq (const void *x, const void *y)
return true;
}
-/* Build a temporary. Make sure and register it to be renamed. */
-
-static tree
-make_temp (tree type, const char *prefix)
-{
- tree t = create_tmp_var (type, prefix);
- add_referenced_tmp_var (t);
- bitmap_set_bit (vars_to_rename, var_ann (t)->uid);
- return t;
-}
-
/* Mark all the variables in VDEF operands for STMT for renaming.
This becomes necessary when we modify all of a non-scalar. */
@@ -194,7 +183,7 @@ lookup_scalar (struct sra_elt *key, tree type)
res = xmalloc (sizeof (*res));
*slot = res;
*res = *key;
- res->replace = make_temp (type, "SR");
+ res->replace = make_rename_temp (type, "SR");
if (DECL_NAME (key->base) && !DECL_IGNORED_P (key->base))
{
@@ -691,7 +680,7 @@ create_scalar_copies (tree lhs, tree rhs, enum sra_copy_mode mode)
tree stmt, tmp;
/* Add TMP = VA_ARG_EXPR <> */
- tmp = make_temp (TREE_TYPE (rhs), NULL);
+ tmp = make_rename_temp (TREE_TYPE (rhs), NULL);
stmt = csc_assign (&tsi, tmp, rhs);
/* Mark all the variables in VDEF operands for renaming, because