Home | History | Annotate | Download | only in gcc

Lines Matching defs:iv0

1152    of the loop with ending condition IV0 < IV1 (computed in TYPE).
1153 DELTA is the difference IV1->base - IV0->base, STEP is the absolute value
1157 we return false. BNDS bounds the value of IV1->base - IV0->base,
1162 number_of_iterations_lt_to_ne (tree type, affine_iv *iv0, affine_iv *iv1,
1200 (iv0->no_overflow && integer_nonzerop (iv0->step))
1203 if (integer_nonzerop (iv0->step))
1207 iv0->base <= iv1->base + MOD. */
1220 /* The final value of the iv is iv0->base - MOD, assuming that this
1222 iv0->base - MOD <= iv1->base. */
1228 iv0->base, bound);
1234 /* IV0 < IV1 does not loop if IV0->base >= IV1->base. */
1239 iv0->base, iv1->base);
1259 with ending condition IV0 < IV1 does not overflow. Types of IV0 and IV1
1264 assert_no_overflow_lt (tree type, affine_iv *iv0, affine_iv *iv1,
1270 if (integer_nonzerop (iv0->step))
1272 /* for (i = iv0->base; i < iv1->base; i += iv0->step) */
1273 if (iv0->no_overflow)
1276 /* If iv0->base is a constant, we can determine the last value before
1280 if (TREE_CODE (iv0->base) == INTEGER_CST)
1284 fold_convert (niter_type, iv0->base));
1297 /* for (i = iv1->base; i > iv0->base; i += iv1->step) */
1314 iv0->base, bound);
1323 iv0->no_overflow = true;
1329 is IV0 < IV1 rolls. TYPE is the type of the control iv. BNDS
1330 bounds the value of IV1->base - IV0->base. */
1333 assert_loop_rolls_lt (tree type, affine_iv *iv0, affine_iv *iv1,
1343 (iv1->base - iv0->base + step - 1) / step, computed in the unsigned
1346 -step + 1 <= (iv1->base - iv0->base) <= MAX - step + 1
1352 Usually, for loops with exit condition iv0->base + step * i < iv1->base,
1353 we have a condition of the form iv0->base - step < iv1->base before the loop,
1354 and for loops iv0->base < iv1->base - step * i the condition
1355 iv0->base < iv1->base + step, due to loop header copying, which enable us
1364 if (integer_nonzerop (iv0->step))
1365 dstep = wi::to_widest (iv0->step);
1402 if (integer_nonzerop (iv0->step))
1405 iv0->step, build_int_cst (type1, 1));
1407 /* We need to know that iv0->base >= MIN + iv0->step - 1. Since
1415 iv0->base, bound);
1418 /* And then we can compute iv0->base - diff, and compare it with
1421 fold_convert (type1, iv0->base), diff);
1437 mbzl = fold_convert (type1, iv0->base);
1454 is IV0 < IV1 which likes: {base, -C} < n, or n < {base, C}.
1458 number_of_iterations_until_wrap (class loop *loop, tree type, affine_iv *iv0,
1465 may_be_zero = fold_build2 (LE_EXPR, boolean_type_node, iv1->base, iv0->base);
1475 if (integer_zerop (iv0->step) && !tree_int_cst_sign_bit (iv1->step))
1480 assumptions = fold_build2 (LE_EXPR, boolean_type_node, last, iv0->base);
1496 TREE_OPERAND (iv1->base, 0), iv0->base);
1507 else if (TREE_CODE (iv0->base) == INTEGER_CST)
1508 low = wi::to_wide (iv0->base);
1513 else if (tree_int_cst_sign_bit (iv0->step) && integer_zerop (iv1->step))
1515 step = fold_build1 (NEGATE_EXPR, TREE_TYPE (iv0->step), iv0->step);
1523 fold_convert (niter_type, iv0->base),
1526 if (TREE_CODE (iv0->base) == INTEGER_CST)
1527 high = wi::to_wide (iv0->base) + 1;
1586 is IV0 < IV1. TYPE is the type of the iv. The number of
1588 IV1->base - IV0->base. EXIT_MUST_BE_TAKEN is true if we know
1592 number_of_iterations_lt (class loop *loop, tree type, affine_iv *iv0,
1600 if (integer_nonzerop (iv0->step))
1602 niter->control = *iv0;
1610 niter->bound = iv0->base;
1614 if (tree_int_cst_sign_bit (iv0->step)
1616 return number_of_iterations_until_wrap (loop, type, iv0, iv1, niter);
1620 fold_convert (niter_type, iv0->base));
1623 if ((integer_onep (iv0->step) && integer_zerop (iv1->step))
1624 || (integer_all_onesp (iv1->step) && integer_zerop (iv0->step)))
1626 /* for (i = iv0
1630 for (i = iv1->base; i > iv0->base; i--).
1632 In both cases # of iterations is iv1->base - iv0->base, assuming that
1633 iv1->base >= iv0->base.
1636 iv1->base - iv0->base, computed in full precision. If the difference
1642 iv1->base, iv0->base);
1650 if (integer_nonzerop (iv0->step))
1651 step = fold_convert (niter_type, iv0->step);
1659 if (number_of_iterations_lt_to_ne (type, iv0, iv1, niter, &delta, step,
1675 if (!assert_no_overflow_lt (type, iv0, iv1, niter, step))
1679 this to work, we must know that iv1->base >= iv0->base - step + 1,
1681 assert_loop_rolls_lt (type, iv0, iv1, niter, bnds);
1703 is IV0 <= IV1. TYPE is the type of the iv. The number of
1707 is the case). BNDS bounds the difference IV1->base - IV0->base. */
1710 number_of_iterations_le (class loop *loop, tree type, affine_iv *iv0,
1719 /* Say that IV0 is the control variable. Then IV0 <= IV1 iff
1720 IV0 < IV1 + 1, assuming that IV1 is not equal to the greatest
1730 if (integer_nonzerop (iv0->step))
1735 iv0->base, TYPE_MIN_VALUE (type));
1744 if (integer_nonzerop (iv0->step))
1753 iv0->base = fold_build_pointer_plus_hwi (iv0->base, -1);
1755 iv0->base = fold_build2 (MINUS_EXPR, type1,
1756 iv0->base, build_int_cst (type1, 1));
1760 return number_of_iterations_lt (loop, type, iv0, iv1, niter, exit_must_be_taken,
1785 is IV0, the right-hand side is IV1. Both induction variables must have
1805 tree type, affine_iv *iv0, enum tree_code code,
1818 && (!iv0->no_overflow || !iv1->no_overflow
1837 || (code == NE_EXPR && integer_zerop (iv0->step)))
1839 std::swap (iv0, iv1);
1845 /* Comparison of pointers is undefined unless both iv0 and iv1 point
1850 iv0->no_overflow = true;
1859 if (!integer_zerop (iv0->step) && iv0->no_overflow)
1868 {iv0.base, iv0.step} cmp_code {iv1.base, iv1.step}
1870 {iv0.base, iv0.step - iv1.step} cmp_code {iv1.base, 0}
1875 b) iv0 and iv1 do not overflow and iv0.step - iv1.step is of
1876 the same sign and of less or equal magnitude than iv0.step
1879 if (!integer_zerop (iv0->step) && !integer_zerop (iv1->step))
1883 iv0->step, iv1->step);
1886 of IV1 to that of IV0 does not introduce overflow. */
1888 || !iv0->no_overflow || !iv1->no_overflow)
1892 iv0->no_overflow = false;
1894 /* If the new step of IV0 has changed sign or is of greater
1895 magnitude then we do not know whether IV0 does overflow
1897 else if (tree_int_cst_sign_bit (step) != tree_int_cst_sign_bit (iv0->step)
1899 wi::abs (wi::to_widest (iv0->step))))
1912 iv0->no_overflow = false;
1915 iv0->step = step;
1923 if (integer_zerop (iv0->step) && integer_zerop (iv1->step))
1927 tree tem = fold_binary (code, boolean_type_node, iv0->base, iv1->base);
1939 bound_difference (loop, iv1->base, iv0->base, &bnds);
1947 dump_affine_iv (dump_file, iv0);
1966 ret = number_of_iterations_ne (loop, type, iv0, iv1->base, niter,
1971 ret = number_of_iterations_lt (loop, type, iv0, iv1, niter,
1976 ret = number_of_iterations_le (loop, type, iv0, iv1, niter,
2495 affine_iv iv0, iv1;
2551 op0, &iv0, safe ? &iv0_niters : NULL, false))
2565 iv0.base = expand_simple_operations (iv0.base);
2576 if (!number_of_iterations_cond (loop, type, &iv0, code, &iv1, niter,