Home | History | Annotate | Download | only in optimizing

Lines Matching refs:upper

220   // Try to narrow upper bound. Returns the lowest of the two if possible.
231 // Favor array length as upper bound.
283 * Represent a range of lower bound and upper bound, both being inclusive.
291 ValueRange(ScopedArenaAllocator* allocator, ValueBound lower, ValueBound upper)
292 : allocator_(allocator), lower_(lower), upper_(upper) {}
341 // and invalidate the upper bound.
344 ValueBound upper = upper_.Add(constant, &overflow, &underflow);
346 // Upper bound overflow will wrap around to negative values
350 return new (allocator_) ValueRange(allocator_, lower, upper);
425 // max possible integer value of range's upper value.
426 int32_t upper = std::numeric_limits<int32_t>::max();
427 // Try to lower upper.
430 upper = upper_bound.GetConstant();
433 upper = max_array_len + upper_bound.GetConstant();
438 // that's <= upper, (last_num_in_sequence + increment_) doesn't trigger overflow,
441 // Be conservative first, assume last number in the sequence hits upper.
442 int32_t last_num_in_sequence = upper;
445 if (upper <= initial_constant) {
446 last_num_in_sequence = upper;
450 ((int64_t)upper - (int64_t)initial_constant) / increment_ * increment_;
454 // No overflow. The sequence will be stopped by the upper bound test as expected.
463 ValueBound upper = ValueBound::NarrowUpperBound(bound_, range->GetUpper());
464 if ((!upper.IsConstant() || upper.GetConstant() == std::numeric_limits<int32_t>::max()) &&
465 !upper.IsRelatedToArrayLength()) {
466 // Upper
475 return new (GetAllocator()) ValueRange(GetAllocator(), range->GetLower(), upper);
719 // Each comparison can establish a lower bound and an upper bound
722 ValueBound upper = bound;
725 // For i<j, we can still use j's upper bound as i's upper bound. Same for lower.
737 upper = right_range->GetUpper();
740 upper = ValueBound::Max();
746 if (!upper.Equals(ValueBound::Max())) {
747 int32_t compensation = (cond == kCondLT) ? -1 : 0; // upper bound is inclusive
748 ValueBound new_upper = upper.Add(compensation, &overflow, &underflow);
781 if (!upper.Equals(ValueBound::Max())) {
782 int32_t compensation = (cond == kCondGE) ? -1 : 0; // upper bound is inclusive
783 ValueBound new_upper = upper.Add(compensation, &overflow, &underflow);
793 if (lower.IsConstant() && upper.IsConstant()) {
797 if (!lower.Equals(ValueBound::Min()) || !upper.Equals(ValueBound::Max())) {
798 ValueRange* new_range = new (&allocator_) ValueRange(&allocator_, lower, upper);
805 if (lower.GetConstant() == 0 && upper.GetConstant() == 0) {
812 } else if (lower.IsRelatedToArrayLength() && lower.Equals(upper)) {
816 ValueRange* new_range = new (&allocator_) ValueRange(&allocator_, lower, upper);
835 ValueBound upper = ValueBound(array_length, -1); // array_length - 1
836 ValueRange array_range(&allocator_, lower, upper);
900 ValueBound upper = ValueBound::Max();
901 ValueRange* range = new (&allocator_) ValueRange(&allocator_, lower, upper);
974 // For i=j, we can still use j's upper bound as i's upper bound.
1050 ValueBound upper = right_range->GetUpper();
1051 if (lower.IsConstant() && upper.IsRelatedToArrayLength()) {
1052 HInstruction* upper_inst = upper.GetInstruction();
1057 int32_t c2 = upper.GetConstant();
1066 ValueBound(nullptr, right_const - upper.GetConstant()),
1193 ValueBound upper = ValueBound(right, -1); // array_length - 1
1197 upper);
1219 ValueBound upper = ValueBound(new_array, -right_const);
1220 ValueRange* range = new (&allocator_) ValueRange(&allocator_, lower, upper);
1280 HInstruction* upper = GetGraph()->GetIntConstant(max_c);
1286 upper = new (GetGraph()->GetAllocator()) HAdd(DataType::Type::kInt32, base, upper);
1288 block->InsertInstructionBefore(upper, bounds_check);
1289 InsertDeoptInBlock(bounds_check, new (GetGraph()->GetAllocator()) HAbove(lower, upper));
1292 bounds_check, new (GetGraph()->GetAllocator()) HAboveOrEqual(upper, array_length));
1509 // (3) general case, unit strides (where lower would exceed upper for arithmetic wrap-around)
1664 // ensure upper bound cannot cause an infinite loop.
1759 * for (int i = lower; i < upper; i++) {
1765 * if (lower < upper) {
1768 * if (lower > upper) deoptimize; // unsigned
1769 * if (upper >= array_length) deoptimize; // unsigned
1773 * for (int i = lower; i < upper; i++) {