Lines Matching refs:ValueBound
34 class ValueBound : public ValueObject { class
36 ValueBound(HInstruction* instruction, int32_t constant) { in ValueBound() function in art::ValueBound
95 static ValueBound AsValueBound(HInstruction* instruction) { in AsValueBound()
97 return ValueBound(nullptr, instruction->AsIntConstant()->GetValue()); in AsValueBound()
102 return ValueBound(left, right); in AsValueBound()
104 return ValueBound(instruction, 0); in AsValueBound()
109 static ValueBound DetectValueBoundFromValue(HInstruction* instruction, /* out */ bool* found) { in DetectValueBoundFromValue()
113 return ValueBound(nullptr, instruction->AsIntConstant()->GetValue()); in DetectValueBoundFromValue()
118 return ValueBound(instruction, 0); in DetectValueBoundFromValue()
126 return ValueBound(left, right); in DetectValueBoundFromValue()
132 return ValueBound::Max(); in DetectValueBoundFromValue()
149 static ValueBound Min() { return ValueBound(nullptr, std::numeric_limits<int32_t>::min()); } in Min()
150 static ValueBound Max() { return ValueBound(nullptr, std::numeric_limits<int32_t>::max()); } in Max()
152 bool Equals(ValueBound bound) const { in Equals()
184 bool GreaterThanOrEqualTo(ValueBound bound) const { in GreaterThanOrEqualTo()
193 bool LessThanOrEqualTo(ValueBound bound) const { in LessThanOrEqualTo()
202 bool GreaterThan(ValueBound bound) const { in GreaterThan()
211 bool LessThan(ValueBound bound) const { in LessThan()
221 static ValueBound NarrowLowerBound(ValueBound bound1, ValueBound bound2) { in NarrowLowerBound()
236 static ValueBound NarrowUpperBound(ValueBound bound1, ValueBound bound2) { in NarrowUpperBound()
252 ValueBound Add(int32_t c, /* out */ bool* overflow, /* out */ bool* underflow) const { in Add()
268 return ValueBound(instruction_, new_constant); in Add()
283 return ValueBound(instruction_, new_constant); in Add()
305 ValueRange(ArenaAllocator* allocator, ValueBound lower, ValueBound upper) in ValueRange()
316 ValueBound GetLower() const { return lower_; } in GetLower()
317 ValueBound GetUpper() const { return upper_; } in GetUpper()
345 ValueBound::NarrowLowerBound(lower_, range->lower_), in Narrow()
346 ValueBound::NarrowUpperBound(upper_, range->upper_)); in Narrow()
352 ValueBound lower = lower_.Add(constant, &overflow, &underflow); in Add()
358 ValueBound upper = upper_.Add(constant, &overflow, &underflow); in Add()
369 const ValueBound lower_; // inclusive
370 const ValueBound upper_; // inclusive
387 ValueBound bound) in MonotonicValueRange()
390 : ValueRange(allocator, ValueBound::Min(), ValueBound::Max()), in MonotonicValueRange()
399 ValueBound GetBound() const { return bound_; } in GetBound()
427 ValueBound lower = ValueBound::NarrowLowerBound(bound_, range->GetLower()); in Narrow()
442 ValueBound upper_bound = range->GetUpper(); in Narrow()
477 ValueBound upper = ValueBound::NarrowUpperBound(bound_, range->GetUpper()); in Narrow()
502 const ValueBound bound_; // Additional value bound info for initial_.
730 ValueBound bound = ValueBound::DetectValueBoundFromValue(right, &found); in HandleIf()
733 ValueBound lower = bound; in HandleIf()
734 ValueBound upper = bound; in HandleIf()
751 lower = ValueBound::Min(); in HandleIf()
752 upper = ValueBound::Max(); in HandleIf()
758 if (!upper.Equals(ValueBound::Max())) { in HandleIf()
760 ValueBound new_upper = upper.Add(compensation, &overflow, &underflow); in HandleIf()
765 ValueRange(GetGraph()->GetArena(), ValueBound::Min(), new_upper); in HandleIf()
770 if (!lower.Equals(ValueBound::Min()) && !lower.IsRelatedToArrayLength()) { in HandleIf()
772 ValueBound new_lower = lower.Add(compensation, &overflow, &underflow); in HandleIf()
777 ValueRange(GetGraph()->GetArena(), new_lower, ValueBound::Max()); in HandleIf()
782 if (!lower.Equals(ValueBound::Min()) && !lower.IsRelatedToArrayLength()) { in HandleIf()
784 ValueBound new_lower = lower.Add(compensation, &overflow, &underflow); in HandleIf()
789 ValueRange(GetGraph()->GetArena(), new_lower, ValueBound::Max()); in HandleIf()
793 if (!upper.Equals(ValueBound::Max())) { in HandleIf()
795 ValueBound new_upper = upper.Add(compensation, &overflow, &underflow); in HandleIf()
800 ValueRange(GetGraph()->GetArena(), ValueBound::Min(), new_upper); in HandleIf()
818 ValueBound lower = ValueBound(nullptr, 0); // constant 0 in VisitBoundsCheck()
819 ValueBound upper = ValueBound(array_length, -1); // array_length - 1 in VisitBoundsCheck()
849 ValueBound lower = existing_range->GetLower(); in VisitBoundsCheck()
867 ValueBound lower = ValueBound(nullptr, constant + 1); in VisitBoundsCheck()
868 ValueBound upper = ValueBound::Max(); in VisitBoundsCheck()
915 if (ValueBound::IsAddOrSubAConstant(instruction, &left, &increment)) { in VisitPhi()
923 ValueBound(initial_value, 0), in VisitPhi()
924 ValueBound(initial_value, 0)); in VisitPhi()
928 ValueBound bound = ValueBound::DetectValueBoundFromValue( in VisitPhi()
939 bound = increment > 0 ? ValueBound::Min() : ValueBound::Max(); in VisitPhi()
1004 if (ValueBound::IsAddOrSubAConstant(left, &left_of_left, &right_const)) { in VisitSub()
1013 ValueBound lower = right_range->GetLower(); in VisitSub()
1014 ValueBound upper = right_range->GetUpper(); in VisitSub()
1018 if (ValueBound::Equal(array_length, upper_inst)) { in VisitSub()
1024 if (!ValueBound::WouldAddOverflowOrUnderflow(c0, -c2) && in VisitSub()
1025 !ValueBound::WouldAddOverflowOrUnderflow(c0, -c1)) { in VisitSub()
1030 ValueBound(nullptr, right_const - upper.GetConstant()), in VisitSub()
1031 ValueBound(array_length, right_const - lower.GetConstant())); in VisitSub()
1061 if (ValueBound::IsAddOrSubAConstant(left, &left_of_left, &c)) { in FindAndHandlePartialArrayLength()
1078 ValueBound(nullptr, std::numeric_limits<int32_t>::min()), in FindAndHandlePartialArrayLength()
1079 ValueBound(left, 0)); in FindAndHandlePartialArrayLength()
1104 ValueBound(nullptr, 0), in VisitAnd()
1105 ValueBound(nullptr, constant)); in VisitAnd()
1116 if (ValueBound::IsAddOrSubAConstant(len, &left, &right_const)) { in VisitNewArray()
1119 ValueBound lower = ValueBound(nullptr, -right_const); in VisitNewArray()
1123 ValueBound upper = ValueBound(new_array, -right_const); in VisitNewArray()
1209 ValueBound value = ValueBound::AsValueBound(index); in AddComparesWithDeoptimization()
1225 ValueBound other_value = ValueBound::AsValueBound(other_index); in AddComparesWithDeoptimization()
1254 int32_t other_c = ValueBound::AsValueBound(other_index).GetConstant(); in AddComparesWithDeoptimization()
1299 ValueBound(v1.instruction, v1.b_constant), in InductionRangeFitsIn()
1300 ValueBound(v2.instruction, v2.b_constant)); in InductionRangeFitsIn()