Lines Matching refs:ValueBound

29 class ValueBound : public ValueObject {  class
31 ValueBound(HInstruction* instruction, int32_t constant) { in ValueBound() function in art::ValueBound
82 static ValueBound DetectValueBoundFromValue(HInstruction* instruction, bool* found) { in DetectValueBoundFromValue()
86 return ValueBound(nullptr, instruction->AsIntConstant()->GetValue()); in DetectValueBoundFromValue()
91 return ValueBound(instruction, 0); in DetectValueBoundFromValue()
99 return ValueBound(left, right); in DetectValueBoundFromValue()
105 return ValueBound::Max(); in DetectValueBoundFromValue()
122 static ValueBound Min() { return ValueBound(nullptr, INT_MIN); } in Min()
123 static ValueBound Max() { return ValueBound(nullptr, INT_MAX); } in Max()
125 bool Equals(ValueBound bound) const { in Equals()
159 bool GreaterThanOrEqualTo(ValueBound bound) const { in GreaterThanOrEqualTo()
168 bool LessThanOrEqualTo(ValueBound bound) const { in LessThanOrEqualTo()
178 static ValueBound NarrowLowerBound(ValueBound bound1, ValueBound bound2) { in NarrowLowerBound()
193 static ValueBound NarrowUpperBound(ValueBound bound1, ValueBound bound2) { in NarrowUpperBound()
209 ValueBound Add(int32_t c, bool* overflow, bool* underflow) const { in Add()
225 return ValueBound(instruction_, new_constant); in Add()
240 return ValueBound(instruction_, new_constant); in Add()
369 (ValueBound::IsAddOrSubAConstant(index, &left, &right) && in Run()
415 ValueRange(ArenaAllocator* allocator, ValueBound lower, ValueBound upper) in ValueRange()
426 ValueBound GetLower() const { return lower_; } in GetLower()
427 ValueBound GetUpper() const { return upper_; } in GetUpper()
455 ValueBound::NarrowLowerBound(lower_, range->lower_), in Narrow()
456 ValueBound::NarrowUpperBound(upper_, range->upper_)); in Narrow()
462 ValueBound lower = lower_.Add(constant, &overflow, &underflow); in Add()
468 ValueBound upper = upper_.Add(constant, &overflow, &underflow); in Add()
479 const ValueBound lower_; // inclusive
480 const ValueBound upper_; // inclusive
497 ValueBound bound) in MonotonicValueRange()
500 : ValueRange(allocator, ValueBound::Min(), ValueBound::Max()), in MonotonicValueRange()
512 ValueBound GetBound() const { return bound_; } in GetBound()
559 ValueBound lower = ValueBound::NarrowLowerBound(bound_, range->GetLower()); in Narrow()
574 ValueBound upper_bound = range->GetUpper(); in Narrow()
609 ValueBound upper = ValueBound::NarrowUpperBound(bound_, range->GetUpper()); in Narrow()
723 ValueBound lower = ValueBound(0, -finder.GetOffsetLow()); in NarrowWithDeoptimization()
724 ValueBound upper = ValueBound(finder.GetFoundArrayLength(), -1 - finder.GetOffsetHigh()); in NarrowWithDeoptimization()
1091 const ValueBound bound_; // Additional value bound info for initial_.
1280 ValueBound bound = ValueBound::DetectValueBoundFromValue(right, &found); in HandleIf()
1283 ValueBound lower = bound; in HandleIf()
1284 ValueBound upper = bound; in HandleIf()
1301 lower = ValueBound::Min(); in HandleIf()
1302 upper = ValueBound::Max(); in HandleIf()
1319 if (!upper.Equals(ValueBound::Max())) { in HandleIf()
1321 ValueBound new_upper = upper.Add(compensation, &overflow, &underflow); in HandleIf()
1326 ValueRange(GetGraph()->GetArena(), ValueBound::Min(), new_upper); in HandleIf()
1331 if (!lower.Equals(ValueBound::Min()) && !lower.IsRelatedToArrayLength()) { in HandleIf()
1333 ValueBound new_lower = lower.Add(compensation, &overflow, &underflow); in HandleIf()
1338 ValueRange(GetGraph()->GetArena(), new_lower, ValueBound::Max()); in HandleIf()
1354 if (!lower.Equals(ValueBound::Min()) && !lower.IsRelatedToArrayLength()) { in HandleIf()
1356 ValueBound new_lower = lower.Add(compensation, &overflow, &underflow); in HandleIf()
1361 ValueRange(GetGraph()->GetArena(), new_lower, ValueBound::Max()); in HandleIf()
1365 if (!upper.Equals(ValueBound::Max())) { in HandleIf()
1367 ValueBound new_upper = upper.Add(compensation, &overflow, &underflow); in HandleIf()
1372 ValueRange(GetGraph()->GetArena(), ValueBound::Min(), new_upper); in HandleIf()
1396 ValueBound lower = ValueBound(nullptr, 0); // constant 0 in VisitBoundsCheck()
1397 ValueBound upper = ValueBound(array_length, -1); // array_length - 1 in VisitBoundsCheck()
1421 ValueBound lower = existing_range->GetLower(); in VisitBoundsCheck()
1453 ValueBound lower = ValueBound(nullptr, constant + 1); in VisitBoundsCheck()
1454 ValueBound upper = ValueBound::Max(); in VisitBoundsCheck()
1489 if (ValueBound::IsAddOrSubAConstant(instruction, &left, &increment)) { in VisitPhi()
1497 ValueBound(initial_value, 0), in VisitPhi()
1498 ValueBound(initial_value, 0)); in VisitPhi()
1502 ValueBound bound = ValueBound::DetectValueBoundFromValue( in VisitPhi()
1513 bound = increment > 0 ? ValueBound::Min() : ValueBound::Max(); in VisitPhi()
1609 if (ValueBound::IsAddOrSubAConstant(left, &left_of_left, &right_const)) { in VisitSub()
1618 ValueBound lower = right_range->GetLower(); in VisitSub()
1619 ValueBound upper = right_range->GetUpper(); in VisitSub()
1623 if (ValueBound::Equal(array_length, upper_inst)) { in VisitSub()
1629 if (!ValueBound::WouldAddOverflowOrUnderflow(c0, -c2) && in VisitSub()
1630 !ValueBound::WouldAddOverflowOrUnderflow(c0, -c1)) { in VisitSub()
1635 ValueBound(nullptr, right_const - upper.GetConstant()), in VisitSub()
1636 ValueBound(array_length, right_const - lower.GetConstant())); in VisitSub()
1666 if (ValueBound::IsAddOrSubAConstant(left, &left_of_left, &c)) { in FindAndHandlePartialArrayLength()
1683 ValueBound(nullptr, INT_MIN), in FindAndHandlePartialArrayLength()
1684 ValueBound(left, 0)); in FindAndHandlePartialArrayLength()
1709 ValueBound(nullptr, 0), in VisitAnd()
1710 ValueBound(nullptr, constant)); in VisitAnd()
1721 if (ValueBound::IsAddOrSubAConstant(len, &left, &right_const)) { in VisitNewArray()
1724 ValueBound lower = ValueBound(nullptr, -right_const); in VisitNewArray()
1728 ValueBound upper = ValueBound(new_array, -right_const); in VisitNewArray()
1749 ValueBound lower = ValueBound(nullptr, constant->AsIntConstant()->GetValue() + 1); in VisitDeoptimize()
1751 ValueRange(GetGraph()->GetArena(), lower, ValueBound::Max()); in VisitDeoptimize()
1761 ValueBound lower_bound = range->GetLower(); in AddCompareWithDeoptimization()