The deprecated irange::may_contain_p method differed from contains_p
in that it could handle symbolics, which no longer exist in VRP.
gcc/ChangeLog:
* value-range.cc (irange::may_contain_p): Remove.
* value-range.h (range_includes_zero_p): Rewrite may_contain_p
usage with contains_p.
* vr-values.cc (compare_range_with_value): Same.
return !!cmp2;
}
-/* Return TRUE if it is possible that range contains VAL. */
-
-bool
-irange::may_contain_p (tree val) const
-{
- return value_inside_range (val) != 0;
-}
-
/* Return TRUE if range contains INTEGER_CST. */
/* Return 1 if VAL is inside value range.
0 if VAL is not inside value range.
bool constant_p () const; // DEPRECATED
void normalize_symbolics (); // DEPRECATED
void normalize_addresses (); // DEPRECATED
- bool may_contain_p (tree) const; // DEPRECATED
bool legacy_verbose_union_ (const class irange *); // DEPRECATED
bool legacy_verbose_intersect (const irange *); // DEPRECATED
if (vr->varying_p ())
return true;
- return vr->may_contain_p (build_zero_cst (vr->type ()));
+ tree zero = build_zero_cst (vr->type ());
+ return vr->contains_p (zero);
}
extern void gt_ggc_mx (vrange *);
return NULL_TREE;
/* ~[VAL_1, VAL_2] OP VAL is known if VAL_1 <= VAL <= VAL_2. */
- if (!vr->may_contain_p (val))
+ bool contains_p = TREE_CODE (val) != INTEGER_CST || vr->contains_p (val);
+ if (!contains_p)
return (comp == NE_EXPR) ? boolean_true_node : boolean_false_node;
return NULL_TREE;