aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-05-04 09:04:53 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-05-04 09:04:53 +0000
commitd35936ab70051f5bb7e3e7b9d069cc648f5dac6c (patch)
tree5c3cd9ce515aaedc793b4255fad9d3b6f6f3f621 /gcc/tree-vrp.c
parent8992c063a6de3bce68f41c42147e829bf0fd671f (diff)
downloadgcc-d35936ab70051f5bb7e3e7b9d069cc648f5dac6c.zip
gcc-d35936ab70051f5bb7e3e7b9d069cc648f5dac6c.tar.gz
gcc-d35936ab70051f5bb7e3e7b9d069cc648f5dac6c.tar.bz2
tree.h (int_const_binop): Remove notrunc argument.
2011-05-04 Richard Guenther <rguenther@suse.de> * tree.h (int_const_binop): Remove notrunc argument. * fold-const.c (int_const_binop): Remove notrunc argument. Always create integer constants that are properly truncated. (extract_muldiv_1): Expand one notrunc int_const_binop caller. (const_binop): Remove zero notrunc argument to int_const_binop. (size_binop_loc): Likewise. (fold_div_compare): Likewise. (maybe_canonicalize_comparison_1): Likewise. (fold_comparison): Likewise. (fold_binary_loc): Likewise. (multiple_of_p): Likewise. * expr.c (store_constructor): Likewise. * gimple-fold.c (maybe_fold_offset_to_array_ref): Likewise. (maybe_fold_stmt_addition): Likewise. * ipa-prop.c (ipa_modify_call_arguments): Likewise. * stor-layout.c (layout_type): Likewise. * tree-data-ref.c (tree_fold_divides_p): Likewise. * tree-sra.c (build_ref_for_offset): Likewise. (build_user_friendly_ref_for_offset): Likewise. * tree-ssa-address.c (maybe_fold_tmr): Likewise. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise. * tree-ssa-loop-niter.c (inverse): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. * tree-ssa.c (maybe_rewrite_mem_ref_base): Likewise. * tree-switch-conversion.c (check_range): Likewise. (build_constructors): Likewise. * tree-vect-generic.c (expand_vector_piecewise): Likewise. * tree-vrp.c (set_and_canonicalize_value_range): Likewise. (extract_range_from_assert): Likewise. (vrp_int_const_binop): Likewise. (extract_range_from_binary_expr): Likewise. (extract_range_from_unary_expr): Likewise. (check_array_ref): Likewise. (find_case_label_range): Likewise. (simplify_div_or_mod_using_ranges): Likewise. * tree-cfg.c (group_case_labels_stmt): Use double-ints for comparing case labels for merging. ada/ * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to int_const_binop. (pos_to_constructor): Likewise. fortran/ * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc argument to int_const_binop. From-SVN: r173356
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 4c66571..d940336 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -472,8 +472,8 @@ set_and_canonicalize_value_range (value_range_t *vr, enum value_range_type t,
if (tree_int_cst_lt (max, min))
{
tree one = build_int_cst (TREE_TYPE (min), 1);
- tree tmp = int_const_binop (PLUS_EXPR, max, one, 0);
- max = int_const_binop (MINUS_EXPR, min, one, 0);
+ tree tmp = int_const_binop (PLUS_EXPR, max, one);
+ max = int_const_binop (MINUS_EXPR, min, one);
min = tmp;
/* There's one corner case, if we had [C+1, C] before we now have
@@ -506,14 +506,14 @@ set_and_canonicalize_value_range (value_range_t *vr, enum value_range_type t,
&& integer_zerop (max)))
{
tree one = build_int_cst (TREE_TYPE (max), 1);
- min = int_const_binop (PLUS_EXPR, max, one, 0);
+ min = int_const_binop (PLUS_EXPR, max, one);
max = vrp_val_max (TREE_TYPE (max));
t = VR_RANGE;
}
else if (is_max)
{
tree one = build_int_cst (TREE_TYPE (min), 1);
- max = int_const_binop (MINUS_EXPR, min, one, 0);
+ max = int_const_binop (MINUS_EXPR, min, one);
min = vrp_val_min (TREE_TYPE (min));
t = VR_RANGE;
}
@@ -1526,7 +1526,7 @@ extract_range_from_assert (value_range_t *vr_p, tree expr)
{
min = fold_build1 (NEGATE_EXPR, TREE_TYPE (TREE_OPERAND (cond, 1)),
TREE_OPERAND (cond, 1));
- max = int_const_binop (PLUS_EXPR, limit, min, 0);
+ max = int_const_binop (PLUS_EXPR, limit, min);
cond = TREE_OPERAND (cond, 0);
}
else
@@ -1954,7 +1954,7 @@ vrp_int_const_binop (enum tree_code code, tree val1, tree val2)
{
tree res;
- res = int_const_binop (code, val1, val2, 0);
+ res = int_const_binop (code, val1, val2);
/* If we are using unsigned arithmetic, operate symbolically
on -INF and +INF as int_const_binop only handles signed overflow. */
@@ -1981,7 +1981,7 @@ vrp_int_const_binop (enum tree_code code, tree val1, tree val2)
{
tree tmp = int_const_binop (TRUNC_DIV_EXPR,
res,
- val1, 0);
+ val1);
int check = compare_values (tmp, val2);
if (check != 0)
@@ -2636,7 +2636,7 @@ extract_range_from_binary_expr (value_range_t *vr,
max = fold_unary_to_constant (ABS_EXPR, TREE_TYPE (vr1.min), vr1.min);
if (tree_int_cst_lt (max, vr1.max))
max = vr1.max;
- max = int_const_binop (MINUS_EXPR, max, integer_one_node, 0);
+ max = int_const_binop (MINUS_EXPR, max, integer_one_node);
/* If the dividend is non-negative the modulus will be
non-negative as well. */
if (TYPE_UNSIGNED (TREE_TYPE (max))
@@ -2681,7 +2681,7 @@ extract_range_from_binary_expr (value_range_t *vr,
type = VR_RANGE;
if (vr0_int_cst_singleton_p && vr1_int_cst_singleton_p)
- min = max = int_const_binop (code, vr0.max, vr1.max, 0);
+ min = max = int_const_binop (code, vr0.max, vr1.max);
else if (!int_cst_range0 && !int_cst_range1)
{
set_value_range_to_varying (vr);
@@ -2905,8 +2905,8 @@ extract_range_from_unary_expr (value_range_t *vr, enum tree_code code,
&& (TYPE_PRECISION (outer_type) >= TYPE_PRECISION (inner_type)
|| (vr0.type == VR_RANGE
&& integer_zerop (int_const_binop (RSHIFT_EXPR,
- int_const_binop (MINUS_EXPR, vr0.max, vr0.min, 0),
- size_int (TYPE_PRECISION (outer_type)), 0)))))
+ int_const_binop (MINUS_EXPR, vr0.max, vr0.min),
+ size_int (TYPE_PRECISION (outer_type)))))))
{
tree new_min, new_max;
new_min = force_fit_type_double (outer_type,
@@ -3073,7 +3073,7 @@ extract_range_from_unary_expr (value_range_t *vr, enum tree_code code,
min = (vr0.min != type_min_value
? int_const_binop (PLUS_EXPR, type_min_value,
- integer_one_node, 0)
+ integer_one_node)
: type_min_value);
}
else
@@ -5248,7 +5248,7 @@ check_array_ref (location_t location, tree ref, bool ignore_off_by_one)
}
low_bound = array_ref_low_bound (ref);
- up_bound_p1 = int_const_binop (PLUS_EXPR, up_bound, integer_one_node, 0);
+ up_bound_p1 = int_const_binop (PLUS_EXPR, up_bound, integer_one_node);
if (TREE_CODE (low_sub) == SSA_NAME)
{
@@ -6260,7 +6260,7 @@ find_case_label_range (gimple stmt, tree min, tree max, size_t *min_idx,
for (k = i + 1; k <= j; ++k)
{
low = CASE_LOW (gimple_switch_label (stmt, k));
- if (!integer_onep (int_const_binop (MINUS_EXPR, low, high, 0)))
+ if (!integer_onep (int_const_binop (MINUS_EXPR, low, high)))
{
take_default = true;
break;
@@ -6917,7 +6917,7 @@ simplify_div_or_mod_using_ranges (gimple stmt)
else
{
t = build_int_cst (TREE_TYPE (op1), 1);
- t = int_const_binop (MINUS_EXPR, op1, t, 0);
+ t = int_const_binop (MINUS_EXPR, op1, t);
t = fold_convert (TREE_TYPE (op0), t);
gimple_assign_set_rhs_code (stmt, BIT_AND_EXPR);