From 3244e67d15cd8cf65da89849a2bea5161a7ed102 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Sun, 25 Jul 2004 19:15:50 +0000 Subject: convert.c (convert_to_real, [...]): Replace calls to build with calls to buildN. * convert.c (convert_to_real, convert_to_integer, convert_to_complex): Replace calls to build with calls to buildN. * coverage.c (tree_coverage_counter_ref): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (loc_descriptor_from_tree): Likewise. * emit-rtl.c (component_ref_for_mem_expr, set_mem_attributes_minus_bitpos): Likewise. * explow.c (update_nonlocal_goto_save_area): Likewise. * expmed.c (expand_shift, make_tree, const_mult_add_overflow_p, expand_mult_add): Likewise. * expr.c (emit_block_move_via_libcall, clear_storage_via_libcall, store_constructor, get_inner_reference, expand_expr_real_1, try_casesi, try_tablejump): Likewise. * function.c (expand_function_start): Likewise. * stmt.c (emit_case_bit_tests, expand_end_case_type, node_has_low_bound, node_has_high_bound, emit_case_nodes): Likewise. * stor-layout.c (place_union_field, layout_type): Likewise. * tree.c (substitute_in_expr, tree_fold_gcd): Likewise. * varasm.c (copy_constant): Likewise. From-SVN: r85160 --- gcc/convert.c | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'gcc/convert.c') diff --git a/gcc/convert.c b/gcc/convert.c index 9e89163..6ff1a54 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -268,9 +268,9 @@ convert_to_real (tree type, tree expr) newtype = TREE_TYPE (arg1); if (TYPE_PRECISION (newtype) < TYPE_PRECISION (itype)) { - expr = build (TREE_CODE (expr), newtype, - fold (convert_to_real (newtype, arg0)), - fold (convert_to_real (newtype, arg1))); + expr = build2 (TREE_CODE (expr), newtype, + fold (convert_to_real (newtype, arg0)), + fold (convert_to_real (newtype, arg1))); if (newtype == type) return expr; } @@ -525,7 +525,7 @@ convert_to_integer (tree type, tree expr) /* If the original expression had side-effects, we must preserve it. */ if (TREE_SIDE_EFFECTS (expr)) - return build (COMPOUND_EXPR, type, expr, t); + return build2 (COMPOUND_EXPR, type, expr, t); else return t; } @@ -605,9 +605,9 @@ convert_to_integer (tree type, tree expr) else typex = lang_hooks.types.signed_type (typex); return convert (type, - fold (build (ex_form, typex, - convert (typex, arg0), - convert (typex, arg1)))); + fold (build2 (ex_form, typex, + convert (typex, arg0), + convert (typex, arg1)))); } } } @@ -658,9 +658,9 @@ convert_to_integer (tree type, tree expr) case COND_EXPR: /* It is sometimes worthwhile to push the narrowing down through the conditional and never loses. */ - return fold (build (COND_EXPR, type, TREE_OPERAND (expr, 0), - convert (type, TREE_OPERAND (expr, 1)), - convert (type, TREE_OPERAND (expr, 2)))); + return fold (build3 (COND_EXPR, type, TREE_OPERAND (expr, 0), + convert (type, TREE_OPERAND (expr, 1)), + convert (type, TREE_OPERAND (expr, 2)))); default: break; @@ -704,8 +704,8 @@ convert_to_complex (tree type, tree expr) case ENUMERAL_TYPE: case BOOLEAN_TYPE: case CHAR_TYPE: - return build (COMPLEX_EXPR, type, convert (subtype, expr), - convert (subtype, integer_zero_node)); + return build2 (COMPLEX_EXPR, type, convert (subtype, expr), + convert (subtype, integer_zero_node)); case COMPLEX_TYPE: { @@ -714,23 +714,22 @@ convert_to_complex (tree type, tree expr) if (TYPE_MAIN_VARIANT (elt_type) == TYPE_MAIN_VARIANT (subtype)) return expr; else if (TREE_CODE (expr) == COMPLEX_EXPR) - return fold (build (COMPLEX_EXPR, - type, - convert (subtype, TREE_OPERAND (expr, 0)), - convert (subtype, TREE_OPERAND (expr, 1)))); + return fold (build2 (COMPLEX_EXPR, type, + convert (subtype, TREE_OPERAND (expr, 0)), + convert (subtype, TREE_OPERAND (expr, 1)))); else { expr = save_expr (expr); return - fold (build (COMPLEX_EXPR, - type, convert (subtype, - fold (build1 (REALPART_EXPR, - TREE_TYPE (TREE_TYPE (expr)), - expr))), - convert (subtype, - fold (build1 (IMAGPART_EXPR, - TREE_TYPE (TREE_TYPE (expr)), - expr))))); + fold (build2 (COMPLEX_EXPR, type, + convert (subtype, + fold (build1 (REALPART_EXPR, + TREE_TYPE (TREE_TYPE (expr)), + expr))), + convert (subtype, + fold (build1 (IMAGPART_EXPR, + TREE_TYPE (TREE_TYPE (expr)), + expr))))); } } -- cgit v1.1