aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.h
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2018-07-19 09:12:32 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2018-07-19 09:12:32 +0000
commit3bb1161faf370fb5f6c8745e2c7d4d60cdc30835 (patch)
tree207eeddd30feb310bbc8f4339783c1b9a6aefd4e /gcc/tree-vrp.h
parent30ae6662408271f96a97d28f684022c413b71063 (diff)
downloadgcc-3bb1161faf370fb5f6c8745e2c7d4d60cdc30835.zip
gcc-3bb1161faf370fb5f6c8745e2c7d4d60cdc30835.tar.gz
gcc-3bb1161faf370fb5f6c8745e2c7d4d60cdc30835.tar.bz2
wide-int.h (widest2_int): New.
* wide-int.h (widest2_int): New. * gimple-fold.c (arith_overflowed_p): Use it. * tree.h (widest2_int_cst): New. * tree-vrp.c (wide_int_binop_overflow): Rename from vrp_int_const_binop. Rewrite to work on trees. (extract_range_from_multiplicative_op_1): Abstract code to... (wide_int_range_min_max): ...here. (wide_int_range_cross_product): ...and here. (extract_range_from_binary_expr_1): Abstract overflow code to... (wide_int_range_cross_product_wrapping): ...here. * tree-vrp.h (wide_int_range_cross_product): New. (wide_int_range_cross_product_wrapping): New. From-SVN: r262874
Diffstat (limited to 'gcc/tree-vrp.h')
-rw-r--r--gcc/tree-vrp.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/tree-vrp.h b/gcc/tree-vrp.h
index 946e26e..daf12ce 100644
--- a/gcc/tree-vrp.h
+++ b/gcc/tree-vrp.h
@@ -102,6 +102,19 @@ extern bool vrp_val_is_min (const_tree);
extern bool vrp_val_is_max (const_tree);
extern void copy_value_range (value_range *, value_range *);
extern void set_value_range_to_value (value_range *, tree, bitmap);
+extern bool wide_int_range_cross_product (wide_int &res_lb, wide_int &res_ub,
+ enum tree_code code, signop sign,
+ const wide_int &, const wide_int &,
+ const wide_int &, const wide_int &,
+ bool overflow_undefined);
+extern bool wide_int_range_mult_wrapping (wide_int &res_lb,
+ wide_int &res_ub,
+ signop sign,
+ unsigned prec,
+ const wide_int &min0_,
+ const wide_int &max0_,
+ const wide_int &min1_,
+ const wide_int &max1_);
extern void extract_range_from_binary_expr_1 (value_range *, enum tree_code,
tree, value_range *,
value_range *);