Lines Matching refs:ValueBound

35 class ValueBound : public ValueObject {  class
37 ValueBound(HInstruction* instruction, int32_t constant) { in ValueBound() function in art::ValueBound
96 static ValueBound AsValueBound(HInstruction* instruction) { in AsValueBound()
98 return ValueBound(nullptr, instruction->AsIntConstant()->GetValue()); in AsValueBound()
103 return ValueBound(left, right); in AsValueBound()
105 return ValueBound(instruction, 0); in AsValueBound()
110 static ValueBound DetectValueBoundFromValue(HInstruction* instruction, /* out */ bool* found) { in DetectValueBoundFromValue()
114 return ValueBound(nullptr, instruction->AsIntConstant()->GetValue()); in DetectValueBoundFromValue()
119 return ValueBound(instruction, 0); in DetectValueBoundFromValue()
127 return ValueBound(left, right); in DetectValueBoundFromValue()
133 return ValueBound::Max(); in DetectValueBoundFromValue()
150 static ValueBound Min() { return ValueBound(nullptr, std::numeric_limits<int32_t>::min()); } in Min()
151 static ValueBound Max() { return ValueBound(nullptr, std::numeric_limits<int32_t>::max()); } in Max()
153 bool Equals(ValueBound bound) const { in Equals()
170 bool GreaterThanOrEqualTo(ValueBound bound) const { in GreaterThanOrEqualTo()
179 bool LessThanOrEqualTo(ValueBound bound) const { in LessThanOrEqualTo()
188 bool GreaterThan(ValueBound bound) const { in GreaterThan()
197 bool LessThan(ValueBound bound) const { in LessThan()
207 static ValueBound NarrowLowerBound(ValueBound bound1, ValueBound bound2) { in NarrowLowerBound()
222 static ValueBound NarrowUpperBound(ValueBound bound1, ValueBound bound2) { in NarrowUpperBound()
238 ValueBound Add(int32_t c, /* out */ bool* overflow, /* out */ bool* underflow) const { in Add()
254 return ValueBound(instruction_, new_constant); in Add()
269 return ValueBound(instruction_, new_constant); in Add()
291 ValueRange(ScopedArenaAllocator* allocator, ValueBound lower, ValueBound upper) in ValueRange()
302 ValueBound GetLower() const { return lower_; } in GetLower()
303 ValueBound GetUpper() const { return upper_; } in GetUpper()
331 ValueBound::NarrowLowerBound(lower_, range->lower_), in Narrow()
332 ValueBound::NarrowUpperBound(upper_, range->upper_)); in Narrow()
338 ValueBound lower = lower_.Add(constant, &overflow, &underflow); in Add()
344 ValueBound upper = upper_.Add(constant, &overflow, &underflow); in Add()
355 const ValueBound lower_; // inclusive
356 const ValueBound upper_; // inclusive
373 ValueBound bound) in MonotonicValueRange()
376 : ValueRange(allocator, ValueBound::Min(), ValueBound::Max()), in MonotonicValueRange()
385 ValueBound GetBound() const { return bound_; } in GetBound()
413 ValueBound lower = ValueBound::NarrowLowerBound(bound_, range->GetLower()); in Narrow()
428 ValueBound upper_bound = range->GetUpper(); in Narrow()
463 ValueBound upper = ValueBound::NarrowUpperBound(bound_, range->GetUpper()); in Narrow()
488 const ValueBound bound_; // Additional value bound info for initial_.
718 ValueBound bound = ValueBound::DetectValueBoundFromValue(right, &found); in HandleIf()
721 ValueBound lower = bound; in HandleIf()
722 ValueBound upper = bound; in HandleIf()
739 lower = ValueBound::Min(); in HandleIf()
740 upper = ValueBound::Max(); in HandleIf()
746 if (!upper.Equals(ValueBound::Max())) { in HandleIf()
748 ValueBound new_upper = upper.Add(compensation, &overflow, &underflow); in HandleIf()
753 &allocator_, ValueBound::Min(), new_upper); in HandleIf()
758 if (!lower.Equals(ValueBound::Min()) && !lower.IsRelatedToArrayLength()) { in HandleIf()
760 ValueBound new_lower = lower.Add(compensation, &overflow, &underflow); in HandleIf()
765 &allocator_, new_lower, ValueBound::Max()); in HandleIf()
770 if (!lower.Equals(ValueBound::Min()) && !lower.IsRelatedToArrayLength()) { in HandleIf()
772 ValueBound new_lower = lower.Add(compensation, &overflow, &underflow); in HandleIf()
777 &allocator_, new_lower, ValueBound::Max()); in HandleIf()
781 if (!upper.Equals(ValueBound::Max())) { in HandleIf()
783 ValueBound new_upper = upper.Add(compensation, &overflow, &underflow); in HandleIf()
788 &allocator_, ValueBound::Min(), new_upper); in HandleIf()
797 if (!lower.Equals(ValueBound::Min()) || !upper.Equals(ValueBound::Max())) { in HandleIf()
807 &allocator_, ValueBound(nullptr, 1), ValueBound::Max()); in HandleIf()
834 ValueBound lower = ValueBound(nullptr, 0); // constant 0 in VisitBoundsCheck()
835 ValueBound upper = ValueBound(array_length, -1); // array_length - 1 in VisitBoundsCheck()
850 ValueBound constant_upper(nullptr, existing_range->GetLower().GetConstant() - 1); in VisitBoundsCheck()
881 ValueBound lower = existing_range->GetLower(); in VisitBoundsCheck()
899 ValueBound lower = ValueBound(nullptr, constant + 1); in VisitBoundsCheck()
900 ValueBound upper = ValueBound::Max(); in VisitBoundsCheck()
957 if (ValueBound::IsAddOrSubAConstant(instruction, &left, &increment)) { in VisitPhi()
965 ValueBound(initial_value, 0), in VisitPhi()
966 ValueBound(initial_value, 0)); in VisitPhi()
970 ValueBound bound = ValueBound::DetectValueBoundFromValue( in VisitPhi()
981 bound = increment > 0 ? ValueBound::Min() : ValueBound::Max(); in VisitPhi()
1040 if (ValueBound::IsAddOrSubAConstant(left, &left_of_left, &right_const)) { in VisitSub()
1049 ValueBound lower = right_range->GetLower(); in VisitSub()
1050 ValueBound upper = right_range->GetUpper(); in VisitSub()
1054 if (ValueBound::Equal(array_length, upper_inst)) { in VisitSub()
1060 if (!ValueBound::WouldAddOverflowOrUnderflow(c0, -c2) && in VisitSub()
1061 !ValueBound::WouldAddOverflowOrUnderflow(c0, -c1)) { in VisitSub()
1066 ValueBound(nullptr, right_const - upper.GetConstant()), in VisitSub()
1067 ValueBound(array_length, right_const - lower.GetConstant())); in VisitSub()
1097 if (ValueBound::IsAddOrSubAConstant(left, &left_of_left, &c)) { in FindAndHandlePartialArrayLength()
1114 ValueBound(nullptr, std::numeric_limits<int32_t>::min()), in FindAndHandlePartialArrayLength()
1115 ValueBound(left, 0)); in FindAndHandlePartialArrayLength()
1140 ValueBound(nullptr, 0), in VisitAnd()
1141 ValueBound(nullptr, constant)); in VisitAnd()
1166 ValueBound(nullptr, 1 - right_const), in VisitRem()
1167 ValueBound(nullptr, right_const - 1)); in VisitRem()
1192 ValueBound lower = ValueBound::Min(); // ideally, lower should be '1-array_length'. in VisitRem()
1193 ValueBound upper = ValueBound(right, -1); // array_length - 1 in VisitRem()
1212 if (ValueBound::IsAddOrSubAConstant(len, &left, &right_const)) { in VisitNewArray()
1215 ValueBound lower = ValueBound(nullptr, -right_const); in VisitNewArray()
1219 ValueBound upper = ValueBound(new_array, -right_const); in VisitNewArray()
1311 ValueBound value = ValueBound::AsValueBound(index); in AddComparesWithDeoptimization()
1327 ValueBound other_value = ValueBound::AsValueBound(other_index); in AddComparesWithDeoptimization()
1356 int32_t other_c = ValueBound::AsValueBound(other_index).GetConstant(); in AddComparesWithDeoptimization()
1403 ValueBound(v1.instruction, v1.b_constant), in InductionRangeFitsIn()
1404 ValueBound(v2.instruction, v2.b_constant)); in InductionRangeFitsIn()
1430 ValueBound value = ValueBound::AsValueBound(index); in TransformLoopForDynamicBCE()
1444 ValueBound other_value = ValueBound::AsValueBound(other_index); in TransformLoopForDynamicBCE()
1467 int32_t other_c = ValueBound::AsValueBound(other_index).GetConstant(); in TransformLoopForDynamicBCE()
1489 int32_t other_c = ValueBound::AsValueBound(other_index).GetConstant(); in TransformLoopForDynamicBCE()