aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-07-02 09:18:14 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-07-02 09:18:14 +0000
commit36618b93d0cbf25b1de5ec50998c3430e29c4585 (patch)
tree8b3a78c0cdf460cfb8a6f13264704d3ffe64d60c
parent1c00b50300fc85b1316036dc7da23c302e62222a (diff)
downloadgcc-36618b93d0cbf25b1de5ec50998c3430e29c4585.zip
gcc-36618b93d0cbf25b1de5ec50998c3430e29c4585.tar.gz
gcc-36618b93d0cbf25b1de5ec50998c3430e29c4585.tar.bz2
tree-flow.h (tree_ssa_useless_type_conversion_1): Rename to ...
2007-07-02 Richard Guenther <rguenther@suse.de> * tree-flow.h (tree_ssa_useless_type_conversion_1): Rename to ... (useless_type_conversion_p): ... this. * tree-ssa.c (tree_ssa_useless_type_conversion_1): Rename to ... (useless_type_conversion_p): ... this. * builtins.c (fold_builtin_memory_op): Rename tree_ssa_useless_type_conversion_1 to useless_type_conversion_p. * tree-cfg.c (verify_expr): Likewise. * tree-ssa-address.c (tree_ssa_useless_type_conversion_1): Likewise. * tree-ssa-ccp.c (ccp_fold): Likewise. * tree-ssa-copy.c (may_propagate_copy): Likewise. * tree-ssa-dom.c (eliminate_redundant_computations): Likewise. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise. * tree-ssa-loop-niter.c (refine_bounds_using_guard): Likewise. * tree-ssa-pre.c (eliminate): Likewise. * tree-ssa.c (delete_tree_ssa): Likewise. (tree_ssa_useless_type_conversion): Likewise. * tree.c (build2_stat): Likewise. From-SVN: r126194
-rw-r--r--gcc/ChangeLog20
-rw-r--r--gcc/builtins.c2
-rw-r--r--gcc/tree-cfg.c4
-rw-r--r--gcc/tree-flow.h2
-rw-r--r--gcc/tree-predcom.c2
-rw-r--r--gcc/tree-ssa-address.c2
-rw-r--r--gcc/tree-ssa-ccp.c3
-rw-r--r--gcc/tree-ssa-copy.c2
-rw-r--r--gcc/tree-ssa-dom.c8
-rw-r--r--gcc/tree-ssa-forwprop.c4
-rw-r--r--gcc/tree-ssa-loop-niter.c2
-rw-r--r--gcc/tree-ssa-pre.c4
-rw-r--r--gcc/tree-ssa.c6
-rw-r--r--gcc/tree.c3
14 files changed, 41 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8c642d7..31e1b42 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,23 @@
+2007-07-02 Richard Guenther <rguenther@suse.de>
+
+ * tree-flow.h (tree_ssa_useless_type_conversion_1): Rename to ...
+ (useless_type_conversion_p): ... this.
+ * tree-ssa.c (tree_ssa_useless_type_conversion_1): Rename to ...
+ (useless_type_conversion_p): ... this.
+ * builtins.c (fold_builtin_memory_op): Rename
+ tree_ssa_useless_type_conversion_1 to useless_type_conversion_p.
+ * tree-cfg.c (verify_expr): Likewise.
+ * tree-ssa-address.c (tree_ssa_useless_type_conversion_1): Likewise.
+ * tree-ssa-ccp.c (ccp_fold): Likewise.
+ * tree-ssa-copy.c (may_propagate_copy): Likewise.
+ * tree-ssa-dom.c (eliminate_redundant_computations): Likewise.
+ * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise.
+ * tree-ssa-loop-niter.c (refine_bounds_using_guard): Likewise.
+ * tree-ssa-pre.c (eliminate): Likewise.
+ * tree-ssa.c (delete_tree_ssa): Likewise.
+ (tree_ssa_useless_type_conversion): Likewise.
+ * tree.c (build2_stat): Likewise.
+
2007-07-01 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/32571
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 2229939..cf1d743 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -8584,7 +8584,7 @@ fold_builtin_memory_op (tree dest, tree src, tree len, tree type, bool ignore, i
if (srctype == desttype
|| (gimple_in_ssa_p (cfun)
- && tree_ssa_useless_type_conversion_1 (desttype, srctype)))
+ && useless_type_conversion_p (desttype, srctype)))
expr = srcvar;
else if ((INTEGRAL_TYPE_P (TREE_TYPE (srcvar))
|| POINTER_TYPE_P (TREE_TYPE (srcvar)))
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 3fd5772..09fe7eb 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3287,8 +3287,8 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
}
/* Check to make sure the second operand is an integer with type of
sizetype. */
- if (!tree_ssa_useless_type_conversion_1 (sizetype,
- TREE_TYPE (TREE_OPERAND (t, 1))))
+ if (!useless_type_conversion_p (sizetype,
+ TREE_TYPE (TREE_OPERAND (t, 1))))
{
error ("invalid operand to pointer plus, second operand is not an "
"integer with type of sizetype.");
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 7637869..375b178 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -868,7 +868,7 @@ extern void init_tree_ssa (void);
extern edge ssa_redirect_edge (edge, basic_block);
extern void flush_pending_stmts (edge);
extern bool tree_ssa_useless_type_conversion (tree);
-extern bool tree_ssa_useless_type_conversion_1 (tree, tree);
+extern bool useless_type_conversion_p (tree, tree);
extern void verify_ssa (bool);
extern void delete_tree_ssa (void);
extern void walk_use_def_chains (tree, walk_use_def_chains_fn, void *, bool);
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index db9a8d5..7e8d461 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -633,7 +633,7 @@ determine_offset (struct data_reference *a, struct data_reference *b,
/* Check that both the references access the location in the same type. */
typea = TREE_TYPE (DR_REF (a));
typeb = TREE_TYPE (DR_REF (b));
- if (!tree_ssa_useless_type_conversion_1 (typeb, typea))
+ if (!useless_type_conversion_p (typeb, typea))
return false;
/* Check whether the base address and the step of both references is the
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index 5606dca..cbd9355 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -604,7 +604,7 @@ create_mem_ref (block_stmt_iterator *bsi, tree type, aff_tree *addr)
/* Add the symbol to base, eventually forcing it to register. */
if (parts.base)
{
- gcc_assert (tree_ssa_useless_type_conversion_1
+ gcc_assert (useless_type_conversion_p
(sizetype, TREE_TYPE (parts.base)));
if (parts.index)
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 0ea8675..1188f86 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -899,8 +899,7 @@ ccp_fold (tree stmt)
}
if ((code == NOP_EXPR || code == CONVERT_EXPR)
- && tree_ssa_useless_type_conversion_1 (TREE_TYPE (rhs),
- TREE_TYPE (op0)))
+ && useless_type_conversion_p (TREE_TYPE (rhs), TREE_TYPE (op0)))
return op0;
return fold_unary (code, TREE_TYPE (rhs), op0);
}
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index 97c4c03..b44db52 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -82,7 +82,7 @@ may_propagate_copy (tree dest, tree orig)
DECL_UID (SSA_NAME_VAR (dest)))));
/* Do not copy between types for which we *do* need a conversion. */
- if (!tree_ssa_useless_type_conversion_1 (type_d, type_o))
+ if (!useless_type_conversion_p (type_d, type_o))
return false;
/* FIXME. GIMPLE is allowing pointer assignments and comparisons of
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 0241155..3b7bacd 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -1515,8 +1515,8 @@ eliminate_redundant_computations (tree stmt)
if (cached_lhs
&& ((TREE_CODE (cached_lhs) != SSA_NAME
&& (modify_expr_p
- || tree_ssa_useless_type_conversion_1 (TREE_TYPE (*expr_p),
- TREE_TYPE (cached_lhs))))
+ || useless_type_conversion_p (TREE_TYPE (*expr_p),
+ TREE_TYPE (cached_lhs))))
|| may_propagate_copy (*expr_p, cached_lhs)))
{
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -1541,8 +1541,8 @@ eliminate_redundant_computations (tree stmt)
retval = true;
if (modify_expr_p
- && !tree_ssa_useless_type_conversion_1 (TREE_TYPE (*expr_p),
- TREE_TYPE (cached_lhs)))
+ && !useless_type_conversion_p (TREE_TYPE (*expr_p),
+ TREE_TYPE (cached_lhs)))
cached_lhs = fold_convert (TREE_TYPE (*expr_p), cached_lhs);
propagate_tree_value (expr_p, cached_lhs);
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 29ee888..07d682f 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -601,8 +601,8 @@ forward_propagate_addr_expr_1 (tree name, tree def_rhs, tree use_stmt,
&& rhs == name)
|| ((TREE_CODE (rhs) == NOP_EXPR
|| TREE_CODE (rhs) == CONVERT_EXPR)
- && tree_ssa_useless_type_conversion_1 (TREE_TYPE (rhs),
- TREE_TYPE (def_rhs))))
+ && useless_type_conversion_p (TREE_TYPE (rhs),
+ TREE_TYPE (def_rhs))))
return forward_propagate_addr_expr (lhs, def_rhs);
/* Strip away any outer COMPONENT_REF, ARRAY_REF or ADDR_EXPR
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 966e52b..e209f73 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -213,7 +213,7 @@ refine_bounds_using_guard (tree type, tree varx, mpz_t offx,
STRIP_SIGN_NOPS (c0);
STRIP_SIGN_NOPS (c1);
ctype = TREE_TYPE (c0);
- if (!tree_ssa_useless_type_conversion_1 (ctype, type))
+ if (!useless_type_conversion_p (ctype, type))
return;
break;
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index b971de4..913cd7d 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3698,8 +3698,8 @@ eliminate (void)
which may require adding a simple cast, which fold_convert
will do for us. */
if (TREE_CODE (*rhs_p) != SSA_NAME
- && !tree_ssa_useless_type_conversion_1 (TREE_TYPE (*rhs_p),
- TREE_TYPE (sprime)))
+ && !useless_type_conversion_p (TREE_TYPE (*rhs_p),
+ TREE_TYPE (sprime)))
sprime = fold_convert (TREE_TYPE (*rhs_p), sprime);
pre_stats.eliminations++;
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 9c9206d..b6ac9c6 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -891,7 +891,7 @@ delete_tree_ssa (void)
useless type conversion, otherwise return false. */
bool
-tree_ssa_useless_type_conversion_1 (tree outer_type, tree inner_type)
+useless_type_conversion_p (tree outer_type, tree inner_type)
{
if (inner_type == outer_type)
return true;
@@ -964,7 +964,7 @@ tree_ssa_useless_type_conversion_1 (tree outer_type, tree inner_type)
/* Recurse for complex types. */
else if (TREE_CODE (inner_type) == COMPLEX_TYPE
&& TREE_CODE (outer_type) == COMPLEX_TYPE
- && tree_ssa_useless_type_conversion_1 (TREE_TYPE (outer_type),
+ && useless_type_conversion_p (TREE_TYPE (outer_type),
TREE_TYPE (inner_type)))
return true;
@@ -987,7 +987,7 @@ tree_ssa_useless_type_conversion (tree expr)
/* FIXME: Use of GENERIC_TREE_TYPE here is a temporary measure to work
around known bugs with GIMPLE_MODIFY_STMTs appearing in places
they shouldn't. See PR 30391. */
- return tree_ssa_useless_type_conversion_1
+ return useless_type_conversion_p
(TREE_TYPE (expr),
GENERIC_TREE_TYPE (TREE_OPERAND (expr, 0)));
diff --git a/gcc/tree.c b/gcc/tree.c
index f70a3073..9bf7d48 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3076,8 +3076,7 @@ build2_stat (enum tree_code code, tree tt, tree arg0, tree arg1 MEM_STAT_DECL)
if (code == POINTER_PLUS_EXPR && arg0 && arg1 && tt)
gcc_assert (POINTER_TYPE_P (tt) && POINTER_TYPE_P (TREE_TYPE (arg0))
&& TREE_CODE (TREE_TYPE (arg1)) == INTEGER_TYPE
- && tree_ssa_useless_type_conversion_1 (sizetype,
- TREE_TYPE (arg1)));
+ && useless_type_conversion_p (sizetype, TREE_TYPE (arg1)));
t = make_node_stat (code PASS_MEM_STAT);
TREE_TYPE (t) = tt;