aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-04-17 12:43:02 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-04-17 12:43:02 +0000
commit7e673273293d34110b16bdf56b90192b3382bad9 (patch)
tree4e1243fcafbe74f6c2f33ad441126888a2896ae8 /gcc/tree-ssa-dom.c
parent01cd0938b55019565dd76224d0b20edfbd496cc6 (diff)
downloadgcc-7e673273293d34110b16bdf56b90192b3382bad9.zip
gcc-7e673273293d34110b16bdf56b90192b3382bad9.tar.gz
gcc-7e673273293d34110b16bdf56b90192b3382bad9.tar.bz2
tree-ssa-dom.c (gimple_assign_unary_useless_conversion_p): Remove.
2009-04-17 Richard Guenther <rguenther@suse.de> * tree-ssa-dom.c (gimple_assign_unary_useless_conversion_p): Remove. (record_equivalences_from_stmt): Remove useless checks and simplifications. * tree-ssa-pre.c (eliminate): Avoid converting a constant if the type is already suitable. From-SVN: r146260
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index e2909e8..1a851fa 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -1915,26 +1915,6 @@ eliminate_redundant_computations (gimple_stmt_iterator* gsi)
return retval;
}
-/* Return true if statement GS is an assignment that peforms a useless
- type conversion. It is is intended to be a tuples analog of function
- tree_ssa_useless_type_conversion. */
-
-static bool
-gimple_assign_unary_useless_conversion_p (gimple gs)
-{
- if (is_gimple_assign (gs)
- && (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (gs))
- || gimple_assign_rhs_code (gs) == VIEW_CONVERT_EXPR
- || gimple_assign_rhs_code (gs) == NON_LVALUE_EXPR))
- {
- tree lhs_type = TREE_TYPE (gimple_assign_lhs (gs));
- tree rhs_type = TREE_TYPE (gimple_assign_rhs1 (gs));
- return useless_type_conversion_p (lhs_type, rhs_type);
- }
-
- return false;
-}
-
/* STMT, a GIMPLE_ASSIGN, may create certain equivalences, in either
the available expressions table or the const_and_copies table.
Detect and record those equivalences. */
@@ -1953,14 +1933,10 @@ record_equivalences_from_stmt (gimple stmt, int may_optimize_p)
lhs_code = TREE_CODE (lhs);
if (lhs_code == SSA_NAME
- && (gimple_assign_single_p (stmt)
- || gimple_assign_unary_useless_conversion_p (stmt)))
+ && gimple_assign_single_p (stmt))
{
tree rhs = gimple_assign_rhs1 (stmt);
- /* Strip away any useless type conversions. */
- STRIP_USELESS_TYPE_CONVERSION (rhs);
-
/* If the RHS of the assignment is a constant or another variable that
may be propagated, register it in the CONST_AND_COPIES table. We
do not need to record unwind data for this, since this is a true