{
int in_p;
tree low, high;
- bool is_bool, strict_overflow_p;
+ bool is_bool;
r->exp = NULL_TREE;
r->in_p = false;
- r->strict_overflow_p = false;
r->low = NULL_TREE;
r->high = NULL_TREE;
if (exp != NULL_TREE
low = exp ? build_int_cst (TREE_TYPE (exp), 0) : boolean_false_node;
high = low;
in_p = 0;
- strict_overflow_p = false;
is_bool = false;
if (exp == NULL_TREE)
is_bool = true;
r->in_p = in_p;
r->low = low;
r->high = high;
- r->strict_overflow_p = strict_overflow_p;
}
}
}
/* Helper routine of optimize_range_test.
- [EXP, IN_P, LOW, HIGH, STRICT_OVERFLOW_P] is a merged range for
+ [EXP, IN_P, LOW, HIGH] is a merged range for
RANGE and OTHERRANGE through OTHERRANGE + COUNT - 1 ranges,
OPCODE and OPS are arguments of optimize_range_tests. If OTHERRANGE
is NULL, OTHERRANGEP should not be and then OTHERRANGEP points to
struct range_entry **otherrangep,
unsigned int count, enum tree_code opcode,
vec<operand_entry *> *ops, tree exp, gimple_seq seq,
- bool in_p, tree low, tree high, bool strict_overflow_p)
+ bool in_p, tree low, tree high)
{
unsigned int idx = range->idx;
struct range_entry *swap_with = NULL;
tree optype = op ? TREE_TYPE (op) : boolean_type_node;
tree tem = build_range_check (loc, optype, unshare_expr (exp),
in_p, low, high);
- enum warn_strict_overflow_code wc = WARN_STRICT_OVERFLOW_COMPARISON;
gimple_stmt_iterator gsi;
unsigned int i, uid;
if (swap_with)
std::swap (range->idx, swap_with->idx);
- if (strict_overflow_p && issue_strict_overflow_warning (wc))
- warning_at (loc, OPT_Wstrict_overflow,
- "assuming signed overflow does not occur "
- "when simplifying range test");
-
if (dump_file && (dump_flags & TDF_DETAILS))
{
struct range_entry *r;
range->low = low;
range->high = high;
range->in_p = in_p;
- range->strict_overflow_p = false;
for (i = 0; i < count; i++)
{
lowj = fold_build2 (BIT_AND_EXPR, type, lowi, tem);
highj = fold_build2 (BIT_AND_EXPR, type, highi, tem);
if (update_range_test (rangei, rangej, NULL, 1, opcode, ops, exp,
- NULL, rangei->in_p, lowj, highj,
- rangei->strict_overflow_p
- || rangej->strict_overflow_p))
+ NULL, rangei->in_p, lowj, highj))
return true;
return false;
}
tem1 = fold_build2 (BIT_AND_EXPR, type, tem1, mask);
lowj = build_int_cst (type, 0);
if (update_range_test (rangei, rangej, NULL, 1, opcode, ops, tem1,
- NULL, rangei->in_p, lowj, tem2,
- rangei->strict_overflow_p
- || rangej->strict_overflow_p))
+ NULL, rangei->in_p, lowj, tem2))
return true;
return false;
}
highi, &mask, &lowi);
if (exp == NULL_TREE)
continue;
- bool strict_overflow_p = ranges[i].strict_overflow_p;
candidates.truncate (0);
int end = MIN (i + 64, length);
for (j = i + 1; j < end; j++)
if (exp2 != exp)
continue;
mask |= mask2;
- strict_overflow_p |= ranges[j].strict_overflow_p;
candidates.safe_push (&ranges[j]);
}
tree val = build_zero_cst (optype);
if (update_range_test (&ranges[i], NULL, candidates.address (),
candidates.length (), opcode, ops, exp,
- seq, false, val, val, strict_overflow_p))
+ seq, false, val, val))
{
any_changes = true;
if (tem)
}
tree type1 = TREE_TYPE (ranges[k - 1].exp);
tree type2 = NULL_TREE;
- bool strict_overflow_p = false;
candidates.truncate (0);
if (POINTER_TYPE_P (type1) || TREE_CODE (type1) == OFFSET_TYPE)
type1 = pointer_sized_int_node;
for (j = i; j; j = chains[j - 1])
{
tree type = TREE_TYPE (ranges[j - 1].exp);
- strict_overflow_p |= ranges[j - 1].strict_overflow_p;
if (POINTER_TYPE_P (type) || TREE_CODE (type) == OFFSET_TYPE)
type = pointer_sized_int_node;
if ((b % 4) == 3)
if (update_range_test (&ranges[k - 1], NULL, candidates.address (),
candidates.length (), opcode, ops, op,
seq, ranges[k - 1].in_p, ranges[k - 1].low,
- ranges[k - 1].high, strict_overflow_p))
+ ranges[k - 1].high))
any_changes = true;
else
gimple_seq_discard (seq);
and RHS2 is known to be RHS2 >= 0. */
tree utype = unsigned_type_for (TREE_TYPE (rhs1));
- enum warn_strict_overflow_code wc = WARN_STRICT_OVERFLOW_COMPARISON;
- if ((ranges[*idx].strict_overflow_p
- || ranges[i].strict_overflow_p)
- && issue_strict_overflow_warning (wc))
- warning_at (gimple_location (stmt), OPT_Wstrict_overflow,
- "assuming signed overflow does not occur "
- "when simplifying range test");
-
if (dump_file && (dump_flags & TDF_DETAILS))
{
struct range_entry *r = &ranges[*idx];
ranges[i].low = build_zero_cst (TREE_TYPE (ranges[i].exp));
ranges[i].high = ranges[i].low;
}
- ranges[i].strict_overflow_p = false;
oe = (*ops)[ranges[*idx].idx];
/* Now change all the other range test immediate uses, so that
those tests will be optimized away. */
tree low = ranges[i].low;
tree high = ranges[i].high;
int in_p = ranges[i].in_p;
- bool strict_overflow_p = ranges[i].strict_overflow_p;
int update_fail_count = 0;
for (j = i + 1; j < length; j++)
if (!merge_ranges (&in_p, &low, &high, in_p, low, high,
ranges[j].in_p, ranges[j].low, ranges[j].high))
break;
- strict_overflow_p |= ranges[j].strict_overflow_p;
}
if (j == i + 1)
if (update_range_test (ranges + i, ranges + i + 1, NULL, j - i - 1,
opcode, ops, ranges[i].exp, NULL, in_p,
- low, high, strict_overflow_p))
+ low, high))
{
i = j - 1;
any_changes = true;