tree-complex.c (expand_complex_comparison): Use fold_convert instead of convert.

2004-06-09  Andrew Pinski  <pinskia@physics.uc.edu>

        * tree-complex.c (expand_complex_comparison): Use fold_convert instead
        of convert.
        * tree-inline.c (setup_one_parameter): Likewise.
        * tree-sra.c (csc_build_component_ref): Likewise.
        * tree-ssa-ccp.c (ccp_fold): Likewise.
        * tree-ssa-copy.c (cprop_operand): Likewise.
        * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
        * tree-tailcall.c (tree_optimize_tail_calls_1): Likewise.

From-SVN: r82837
This commit is contained in:
Andrew Pinski 2004-06-09 15:07:03 +00:00 committed by Andrew Pinski
parent 655948a348
commit e072ae27e0
8 changed files with 20 additions and 9 deletions

View File

@ -1,3 +1,14 @@
2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
* tree-complex.c (expand_complex_comparison): Use fold_convert instead
of convert.
* tree-inline.c (setup_one_parameter): Likewise.
* tree-sra.c (csc_build_component_ref): Likewise.
* tree-ssa-ccp.c (ccp_fold): Likewise.
* tree-ssa-copy.c (cprop_operand): Likewise.
* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
* tree-tailcall.c (tree_optimize_tail_calls_1): Likewise.
2004-06-09 J"orn Rennecke <joern.rennecke@superh.com>
PR rtl-optimization/15521:

View File

@ -387,7 +387,7 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai,
/* FALLTHRU */
case MODIFY_EXPR:
type = TREE_TYPE (TREE_OPERAND (stmt, 1));
TREE_OPERAND (stmt, 1) = convert (type, cc);
TREE_OPERAND (stmt, 1) = fold_convert (type, cc);
break;
case COND_EXPR:
TREE_OPERAND (stmt, 0) = cc;

View File

@ -779,7 +779,7 @@ setup_one_parameter (inline_data *id, tree p, tree value,
the argument to the proper type in case it was promoted. */
if (value)
{
tree rhs = convert (TREE_TYPE (var), value);
tree rhs = fold_convert (TREE_TYPE (var), value);
if (rhs == error_mark_node)
return;

View File

@ -587,7 +587,7 @@ csc_build_component_ref (tree base, tree field)
the entire structure should be zeroed. */
if (CONSTRUCTOR_ELTS (base))
abort ();
return convert (TREE_TYPE (field), integer_zero_node);
return fold_convert (TREE_TYPE (field), integer_zero_node);
default:
/* Avoid sharing BASE when building the different COMPONENT_REFs.

View File

@ -953,7 +953,7 @@ ccp_fold (tree stmt)
if (retval)
{
if (TREE_TYPE (retval) != TREE_TYPE (rhs))
retval = convert (TREE_TYPE (rhs), retval);
retval = fold_convert (TREE_TYPE (rhs), retval);
if (TREE_TYPE (retval) == TREE_TYPE (rhs))
return retval;

View File

@ -180,7 +180,7 @@ cprop_operand (stmt_ann_t ann, tree *op_p, varray_type const_and_copies)
if (!lang_hooks.types_compatible_p (op_type, val_type)
&& TREE_CODE (val) != SSA_NAME)
{
val = convert (TREE_TYPE (*op_p), val);
val = fold_convert (TREE_TYPE (*op_p), val);
if (!is_gimple_min_invariant (val)
&& TREE_CODE (val) != SSA_NAME)
return false;

View File

@ -1875,7 +1875,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
TREE_SET_CODE (TREE_OPERAND (dummy_cond, 0), LE_EXPR);
TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 0) = op;
TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1)
= convert (type, integer_zero_node);
= fold_convert (type, integer_zero_node);
}
val = simplify_cond_and_lookup_avail_expr (dummy_cond,
&bd->avail_exprs,
@ -1886,7 +1886,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data,
TREE_SET_CODE (TREE_OPERAND (dummy_cond, 0), GE_EXPR);
TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 0) = op;
TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1)
= convert (type, integer_zero_node);
= fold_convert (type, integer_zero_node);
val = simplify_cond_and_lookup_avail_expr (dummy_cond,
&bd->avail_exprs,

View File

@ -844,7 +844,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
add_referenced_tmp_var (tmp);
phi = create_phi_node (tmp, first);
add_phi_arg (&phi, convert (ret_type, integer_zero_node),
add_phi_arg (&phi, fold_convert (ret_type, integer_zero_node),
first->pred);
a_acc = PHI_RESULT (phi);
}
@ -857,7 +857,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
add_referenced_tmp_var (tmp);
phi = create_phi_node (tmp, first);
add_phi_arg (&phi, convert (ret_type, integer_one_node),
add_phi_arg (&phi, fold_convert (ret_type, integer_one_node),
first->pred);
m_acc = PHI_RESULT (phi);
}