Commit 4845b383 by Kazu Hirata Committed by Kazu Hirata

dojump.c: Fix comment typos.

	* dojump.c: Fix comment typos.  emit-rtl.c, expmed.c, expr.c,
	stmt.c, stor-layout.c: Use fold_buildN instead of
	fold (buildN (...)).

From-SVN: r98848
parent 8fc6e9ab
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
(init_ssanames, fini_ssa_names, make_ssanames, (init_ssanames, fini_ssa_names, make_ssanames,
release_ssa_name): Update uses of ssa_names. release_ssa_name): Update uses of ssa_names.
* dojump.c: Fix comment typos. emit-rtl.c, expmed.c, expr.c,
stmt.c, stor-layout.c: Use fold_buildN instead of
fold (buildN (...)).
2005-04-27 Devang Patel <dpatel@apple.com> 2005-04-27 Devang Patel <dpatel@apple.com>
* dbxout.c (dbxout_type): Check use_gnu_debug_info_extensions. * dbxout.c (dbxout_type): Check use_gnu_debug_info_extensions.
......
...@@ -504,8 +504,8 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label) ...@@ -504,8 +504,8 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
if (if_true_label == 0) if (if_true_label == 0)
drop_through_label = if_true_label = gen_label_rtx (); drop_through_label = if_true_label = gen_label_rtx ();
cmp0 = fold (build2 (tcode1, TREE_TYPE (exp), op0, op1)); cmp0 = fold_build2 (tcode1, TREE_TYPE (exp), op0, op1);
cmp1 = fold (build2 (tcode2, TREE_TYPE (exp), op0, op1)); cmp1 = fold_build2 (tcode2, TREE_TYPE (exp), op0, op1);
do_jump (cmp0, 0, if_true_label); do_jump (cmp0, 0, if_true_label);
do_jump (cmp1, if_false_label, if_true_label); do_jump (cmp1, if_false_label, if_true_label);
} }
......
...@@ -1579,8 +1579,8 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, ...@@ -1579,8 +1579,8 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
index, then convert to sizetype and multiply by the size of index, then convert to sizetype and multiply by the size of
the array element. */ the array element. */
if (! integer_zerop (low_bound)) if (! integer_zerop (low_bound))
index = fold (build2 (MINUS_EXPR, TREE_TYPE (index), index = fold_build2 (MINUS_EXPR, TREE_TYPE (index),
index, low_bound)); index, low_bound);
off_tree = size_binop (PLUS_EXPR, off_tree = size_binop (PLUS_EXPR,
size_binop (MULT_EXPR, convert (sizetype, size_binop (MULT_EXPR, convert (sizetype,
......
...@@ -2232,9 +2232,9 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted, ...@@ -2232,9 +2232,9 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
tree type = TREE_TYPE (amount); tree type = TREE_TYPE (amount);
tree new_amount = make_tree (type, op1); tree new_amount = make_tree (type, op1);
tree other_amount tree other_amount
= fold (build2 (MINUS_EXPR, type, = fold_build2 (MINUS_EXPR, type,
build_int_cst (type, GET_MODE_BITSIZE (mode)), build_int_cst (type, GET_MODE_BITSIZE (mode)),
amount)); amount);
shifted = force_reg (mode, shifted); shifted = force_reg (mode, shifted);
...@@ -4890,23 +4890,23 @@ make_tree (tree type, rtx x) ...@@ -4890,23 +4890,23 @@ make_tree (tree type, rtx x)
} }
case PLUS: case PLUS:
return fold (build2 (PLUS_EXPR, type, make_tree (type, XEXP (x, 0)), return fold_build2 (PLUS_EXPR, type, make_tree (type, XEXP (x, 0)),
make_tree (type, XEXP (x, 1)))); make_tree (type, XEXP (x, 1)));
case MINUS: case MINUS:
return fold (build2 (MINUS_EXPR, type, make_tree (type, XEXP (x, 0)), return fold_build2 (MINUS_EXPR, type, make_tree (type, XEXP (x, 0)),
make_tree (type, XEXP (x, 1)))); make_tree (type, XEXP (x, 1)));
case NEG: case NEG:
return fold (build1 (NEGATE_EXPR, type, make_tree (type, XEXP (x, 0)))); return fold_build1 (NEGATE_EXPR, type, make_tree (type, XEXP (x, 0)));
case MULT: case MULT:
return fold (build2 (MULT_EXPR, type, make_tree (type, XEXP (x, 0)), return fold_build2 (MULT_EXPR, type, make_tree (type, XEXP (x, 0)),
make_tree (type, XEXP (x, 1)))); make_tree (type, XEXP (x, 1)));
case ASHIFT: case ASHIFT:
return fold (build2 (LSHIFT_EXPR, type, make_tree (type, XEXP (x, 0)), return fold_build2 (LSHIFT_EXPR, type, make_tree (type, XEXP (x, 0)),
make_tree (type, XEXP (x, 1)))); make_tree (type, XEXP (x, 1)));
case LSHIFTRT: case LSHIFTRT:
t = lang_hooks.types.unsigned_type (type); t = lang_hooks.types.unsigned_type (type);
...@@ -4986,11 +4986,11 @@ const_mult_add_overflow_p (rtx x, rtx mult, rtx add, ...@@ -4986,11 +4986,11 @@ const_mult_add_overflow_p (rtx x, rtx mult, rtx add,
add_type = (GET_MODE (add) == VOIDmode ? mult_type add_type = (GET_MODE (add) == VOIDmode ? mult_type
: lang_hooks.types.type_for_mode (GET_MODE (add), unsignedp)); : lang_hooks.types.type_for_mode (GET_MODE (add), unsignedp));
result = fold (build2 (PLUS_EXPR, mult_type, result = fold_build2 (PLUS_EXPR, mult_type,
fold (build2 (MULT_EXPR, mult_type, fold_build2 (MULT_EXPR, mult_type,
make_tree (mult_type, x), make_tree (mult_type, x),
make_tree (mult_type, mult))), make_tree (mult_type, mult)),
make_tree (add_type, add))); make_tree (add_type, add));
return TREE_CONSTANT_OVERFLOW (result); return TREE_CONSTANT_OVERFLOW (result);
} }
...@@ -5011,11 +5011,11 @@ expand_mult_add (rtx x, rtx target, rtx mult, rtx add, enum machine_mode mode, ...@@ -5011,11 +5011,11 @@ expand_mult_add (rtx x, rtx target, rtx mult, rtx add, enum machine_mode mode,
tree add_type = (GET_MODE (add) == VOIDmode tree add_type = (GET_MODE (add) == VOIDmode
? type: lang_hooks.types.type_for_mode (GET_MODE (add), ? type: lang_hooks.types.type_for_mode (GET_MODE (add),
unsignedp)); unsignedp));
tree result = fold (build2 (PLUS_EXPR, type, tree result = fold_build2 (PLUS_EXPR, type,
fold (build2 (MULT_EXPR, type, fold_build2 (MULT_EXPR, type,
make_tree (type, x), make_tree (type, x),
make_tree (type, mult))), make_tree (type, mult)),
make_tree (add_type, add))); make_tree (add_type, add));
return expand_expr (result, target, VOIDmode, 0); return expand_expr (result, target, VOIDmode, 0);
} }
......
...@@ -4783,9 +4783,9 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) ...@@ -4783,9 +4783,9 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
if (BYTES_BIG_ENDIAN) if (BYTES_BIG_ENDIAN)
value value
= fold (build2 (LSHIFT_EXPR, type, value, = fold_build2 (LSHIFT_EXPR, type, value,
build_int_cst (NULL_TREE, build_int_cst (NULL_TREE,
BITS_PER_WORD - bitsize))); BITS_PER_WORD - bitsize));
bitsize = BITS_PER_WORD; bitsize = BITS_PER_WORD;
mode = word_mode; mode = word_mode;
} }
...@@ -4986,8 +4986,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) ...@@ -4986,8 +4986,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
/* Assign value to element index. */ /* Assign value to element index. */
position position
= convert (ssizetype, = convert (ssizetype,
fold (build2 (MINUS_EXPR, TREE_TYPE (index), fold_build2 (MINUS_EXPR, TREE_TYPE (index),
index, TYPE_MIN_VALUE (domain)))); index, TYPE_MIN_VALUE (domain)));
position = size_binop (MULT_EXPR, position, position = size_binop (MULT_EXPR, position,
convert (ssizetype, convert (ssizetype,
TYPE_SIZE_UNIT (elttype))); TYPE_SIZE_UNIT (elttype)));
...@@ -5029,10 +5029,10 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) ...@@ -5029,10 +5029,10 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
if (minelt) if (minelt)
index = fold_convert (ssizetype, index = fold_convert (ssizetype,
fold (build2 (MINUS_EXPR, fold_build2 (MINUS_EXPR,
TREE_TYPE (index), TREE_TYPE (index),
index, index,
TYPE_MIN_VALUE (domain)))); TYPE_MIN_VALUE (domain)));
position = size_binop (MULT_EXPR, index, position = size_binop (MULT_EXPR, index,
convert (ssizetype, convert (ssizetype,
...@@ -5485,8 +5485,8 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize, ...@@ -5485,8 +5485,8 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
index, then convert to sizetype and multiply by the size of index, then convert to sizetype and multiply by the size of
the array element. */ the array element. */
if (! integer_zerop (low_bound)) if (! integer_zerop (low_bound))
index = fold (build2 (MINUS_EXPR, TREE_TYPE (index), index = fold_build2 (MINUS_EXPR, TREE_TYPE (index),
index, low_bound)); index, low_bound);
offset = size_binop (PLUS_EXPR, offset, offset = size_binop (PLUS_EXPR, offset,
size_binop (MULT_EXPR, size_binop (MULT_EXPR,
...@@ -8971,9 +8971,9 @@ try_tablejump (tree index_type, tree index_expr, tree minval, tree range, ...@@ -8971,9 +8971,9 @@ try_tablejump (tree index_type, tree index_expr, tree minval, tree range,
if (! HAVE_tablejump) if (! HAVE_tablejump)
return 0; return 0;
index_expr = fold (build2 (MINUS_EXPR, index_type, index_expr = fold_build2 (MINUS_EXPR, index_type,
convert (index_type, index_expr), convert (index_type, index_expr),
convert (index_type, minval))); convert (index_type, minval));
index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0); index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0);
do_pending_stack_adjust (); do_pending_stack_adjust ();
......
...@@ -2238,10 +2238,10 @@ emit_case_bit_tests (tree index_type, tree index_expr, tree minval, ...@@ -2238,10 +2238,10 @@ emit_case_bit_tests (tree index_type, tree index_expr, tree minval,
else else
test[i].bits++; test[i].bits++;
lo = tree_low_cst (fold (build2 (MINUS_EXPR, index_type, lo = tree_low_cst (fold_build2 (MINUS_EXPR, index_type,
n->low, minval)), 1); n->low, minval), 1);
hi = tree_low_cst (fold (build2 (MINUS_EXPR, index_type, hi = tree_low_cst (fold_build2 (MINUS_EXPR, index_type,
n->high, minval)), 1); n->high, minval), 1);
for (j = lo; j <= hi; j++) for (j = lo; j <= hi; j++)
if (j >= HOST_BITS_PER_WIDE_INT) if (j >= HOST_BITS_PER_WIDE_INT)
test[i].hi |= (HOST_WIDE_INT) 1 << (j - HOST_BITS_PER_INT); test[i].hi |= (HOST_WIDE_INT) 1 << (j - HOST_BITS_PER_INT);
...@@ -2251,9 +2251,9 @@ emit_case_bit_tests (tree index_type, tree index_expr, tree minval, ...@@ -2251,9 +2251,9 @@ emit_case_bit_tests (tree index_type, tree index_expr, tree minval,
qsort (test, count, sizeof(*test), case_bit_test_cmp); qsort (test, count, sizeof(*test), case_bit_test_cmp);
index_expr = fold (build2 (MINUS_EXPR, index_type, index_expr = fold_build2 (MINUS_EXPR, index_type,
fold_convert (index_type, index_expr), fold_convert (index_type, index_expr),
fold_convert (index_type, minval))); fold_convert (index_type, minval));
index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0); index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0);
do_pending_stack_adjust (); do_pending_stack_adjust ();
...@@ -2417,7 +2417,7 @@ expand_case (tree exp) ...@@ -2417,7 +2417,7 @@ expand_case (tree exp)
} }
/* Compute span of values. */ /* Compute span of values. */
range = fold (build2 (MINUS_EXPR, index_type, maxval, minval)); range = fold_build2 (MINUS_EXPR, index_type, maxval, minval);
/* Try implementing this switch statement by a short sequence of /* Try implementing this switch statement by a short sequence of
bit-wise comparisons. However, we let the binary-tree case bit-wise comparisons. However, we let the binary-tree case
...@@ -2543,11 +2543,11 @@ expand_case (tree exp) ...@@ -2543,11 +2543,11 @@ expand_case (tree exp)
value since that should fit in a HOST_WIDE_INT while the value since that should fit in a HOST_WIDE_INT while the
actual values may not. */ actual values may not. */
HOST_WIDE_INT i_low HOST_WIDE_INT i_low
= tree_low_cst (fold (build2 (MINUS_EXPR, index_type, = tree_low_cst (fold_build2 (MINUS_EXPR, index_type,
n->low, minval)), 1); n->low, minval), 1);
HOST_WIDE_INT i_high HOST_WIDE_INT i_high
= tree_low_cst (fold (build2 (MINUS_EXPR, index_type, = tree_low_cst (fold_build2 (MINUS_EXPR, index_type,
n->high, minval)), 1); n->high, minval), 1);
HOST_WIDE_INT i; HOST_WIDE_INT i;
for (i = i_low; i <= i_high; i ++) for (i = i_low; i <= i_high; i ++)
...@@ -2828,8 +2828,8 @@ node_has_low_bound (case_node_ptr node, tree index_type) ...@@ -2828,8 +2828,8 @@ node_has_low_bound (case_node_ptr node, tree index_type)
if (node->left) if (node->left)
return 0; return 0;
low_minus_one = fold (build2 (MINUS_EXPR, TREE_TYPE (node->low), low_minus_one = fold_build2 (MINUS_EXPR, TREE_TYPE (node->low),
node->low, integer_one_node)); node->low, integer_one_node);
/* If the subtraction above overflowed, we can't verify anything. /* If the subtraction above overflowed, we can't verify anything.
Otherwise, look for a parent that tests our value - 1. */ Otherwise, look for a parent that tests our value - 1. */
...@@ -2878,8 +2878,8 @@ node_has_high_bound (case_node_ptr node, tree index_type) ...@@ -2878,8 +2878,8 @@ node_has_high_bound (case_node_ptr node, tree index_type)
if (node->right) if (node->right)
return 0; return 0;
high_plus_one = fold (build2 (PLUS_EXPR, TREE_TYPE (node->high), high_plus_one = fold_build2 (PLUS_EXPR, TREE_TYPE (node->high),
node->high, integer_one_node)); node->high, integer_one_node);
/* If the addition above overflowed, we can't verify anything. /* If the addition above overflowed, we can't verify anything.
Otherwise, look for a parent that tests our value + 1. */ Otherwise, look for a parent that tests our value + 1. */
...@@ -3303,8 +3303,8 @@ emit_case_nodes (rtx index, case_node_ptr node, rtx default_label, ...@@ -3303,8 +3303,8 @@ emit_case_nodes (rtx index, case_node_ptr node, rtx default_label,
new_index = expand_simple_binop (mode, MINUS, index, low_rtx, new_index = expand_simple_binop (mode, MINUS, index, low_rtx,
NULL_RTX, unsignedp, NULL_RTX, unsignedp,
OPTAB_WIDEN); OPTAB_WIDEN);
new_bound = expand_expr (fold (build2 (MINUS_EXPR, type, new_bound = expand_expr (fold_build2 (MINUS_EXPR, type,
high, low)), high, low),
NULL_RTX, mode, 0); NULL_RTX, mode, 0);
emit_cmp_and_jump_insns (new_index, new_bound, GT, NULL_RTX, emit_cmp_and_jump_insns (new_index, new_bound, GT, NULL_RTX,
......
...@@ -746,9 +746,9 @@ place_union_field (record_layout_info rli, tree field) ...@@ -746,9 +746,9 @@ place_union_field (record_layout_info rli, tree field)
if (TREE_CODE (rli->t) == UNION_TYPE) if (TREE_CODE (rli->t) == UNION_TYPE)
rli->offset = size_binop (MAX_EXPR, rli->offset, DECL_SIZE_UNIT (field)); rli->offset = size_binop (MAX_EXPR, rli->offset, DECL_SIZE_UNIT (field));
else if (TREE_CODE (rli->t) == QUAL_UNION_TYPE) else if (TREE_CODE (rli->t) == QUAL_UNION_TYPE)
rli->offset = fold (build3 (COND_EXPR, sizetype, rli->offset = fold_build3 (COND_EXPR, sizetype,
DECL_QUALIFIER (field), DECL_QUALIFIER (field),
DECL_SIZE_UNIT (field), rli->offset)); DECL_SIZE_UNIT (field), rli->offset);
} }
#if defined (PCC_BITFIELD_TYPE_MATTERS) || defined (BITFIELD_NBYTES_LIMITED) #if defined (PCC_BITFIELD_TYPE_MATTERS) || defined (BITFIELD_NBYTES_LIMITED)
...@@ -1641,9 +1641,9 @@ layout_type (tree type) ...@@ -1641,9 +1641,9 @@ layout_type (tree type)
that (possible) negative values are handled appropriately. */ that (possible) negative values are handled appropriately. */
length = size_binop (PLUS_EXPR, size_one_node, length = size_binop (PLUS_EXPR, size_one_node,
fold_convert (sizetype, fold_convert (sizetype,
fold (build2 (MINUS_EXPR, fold_build2 (MINUS_EXPR,
TREE_TYPE (lb), TREE_TYPE (lb),
ub, lb)))); ub, lb)));
/* Special handling for arrays of bits (for Chill). */ /* Special handling for arrays of bits (for Chill). */
element_size = TYPE_SIZE (element); element_size = TYPE_SIZE (element);
......
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