Commit e072ae27 by Andrew Pinski Committed by Andrew Pinski

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
parent 655948a3
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> 2004-06-09 J"orn Rennecke <joern.rennecke@superh.com>
PR rtl-optimization/15521: PR rtl-optimization/15521:
......
...@@ -387,7 +387,7 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai, ...@@ -387,7 +387,7 @@ expand_complex_comparison (block_stmt_iterator *bsi, tree ar, tree ai,
/* FALLTHRU */ /* FALLTHRU */
case MODIFY_EXPR: case MODIFY_EXPR:
type = TREE_TYPE (TREE_OPERAND (stmt, 1)); type = TREE_TYPE (TREE_OPERAND (stmt, 1));
TREE_OPERAND (stmt, 1) = convert (type, cc); TREE_OPERAND (stmt, 1) = fold_convert (type, cc);
break; break;
case COND_EXPR: case COND_EXPR:
TREE_OPERAND (stmt, 0) = cc; TREE_OPERAND (stmt, 0) = cc;
......
...@@ -779,7 +779,7 @@ setup_one_parameter (inline_data *id, tree p, tree value, ...@@ -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. */ the argument to the proper type in case it was promoted. */
if (value) if (value)
{ {
tree rhs = convert (TREE_TYPE (var), value); tree rhs = fold_convert (TREE_TYPE (var), value);
if (rhs == error_mark_node) if (rhs == error_mark_node)
return; return;
......
...@@ -587,7 +587,7 @@ csc_build_component_ref (tree base, tree field) ...@@ -587,7 +587,7 @@ csc_build_component_ref (tree base, tree field)
the entire structure should be zeroed. */ the entire structure should be zeroed. */
if (CONSTRUCTOR_ELTS (base)) if (CONSTRUCTOR_ELTS (base))
abort (); abort ();
return convert (TREE_TYPE (field), integer_zero_node); return fold_convert (TREE_TYPE (field), integer_zero_node);
default: default:
/* Avoid sharing BASE when building the different COMPONENT_REFs. /* Avoid sharing BASE when building the different COMPONENT_REFs.
......
...@@ -953,7 +953,7 @@ ccp_fold (tree stmt) ...@@ -953,7 +953,7 @@ ccp_fold (tree stmt)
if (retval) if (retval)
{ {
if (TREE_TYPE (retval) != TREE_TYPE (rhs)) 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)) if (TREE_TYPE (retval) == TREE_TYPE (rhs))
return retval; return retval;
......
...@@ -180,7 +180,7 @@ cprop_operand (stmt_ann_t ann, tree *op_p, varray_type const_and_copies) ...@@ -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) if (!lang_hooks.types_compatible_p (op_type, val_type)
&& TREE_CODE (val) != SSA_NAME) && 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) if (!is_gimple_min_invariant (val)
&& TREE_CODE (val) != SSA_NAME) && TREE_CODE (val) != SSA_NAME)
return false; return false;
......
...@@ -1875,7 +1875,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, ...@@ -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_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), 0) = op;
TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1) 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, val = simplify_cond_and_lookup_avail_expr (dummy_cond,
&bd->avail_exprs, &bd->avail_exprs,
...@@ -1886,7 +1886,7 @@ simplify_rhs_and_lookup_avail_expr (struct dom_walk_data *walk_data, ...@@ -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_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), 0) = op;
TREE_OPERAND (TREE_OPERAND (dummy_cond, 0), 1) 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, val = simplify_cond_and_lookup_avail_expr (dummy_cond,
&bd->avail_exprs, &bd->avail_exprs,
......
...@@ -844,7 +844,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls) ...@@ -844,7 +844,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
add_referenced_tmp_var (tmp); add_referenced_tmp_var (tmp);
phi = create_phi_node (tmp, first); 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); first->pred);
a_acc = PHI_RESULT (phi); a_acc = PHI_RESULT (phi);
} }
...@@ -857,7 +857,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls) ...@@ -857,7 +857,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
add_referenced_tmp_var (tmp); add_referenced_tmp_var (tmp);
phi = create_phi_node (tmp, first); 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); first->pred);
m_acc = PHI_RESULT (phi); m_acc = PHI_RESULT (phi);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment