Lines Matching refs:trip

198   HInductionVarAnalysis::InductionInfo* trip = nullptr;  in GetInductionRange()  local
199 if (!HasInductionInfo(context, instruction, &loop, &info, &trip)) { in GetInductionRange()
219 *min_val = SimplifyMin(GetVal(info, trip, in_body, /* is_min= */ true)); in GetInductionRange()
220 *max_val = SimplifyMax(GetVal(info, trip, in_body, /* is_min= */ false), chase_hint); in GetInductionRange()
221 *needs_finite_test = NeedsTripCount(info, &stride_value) && IsUnsafeTripCount(trip); in GetInductionRange()
225 *min_val = SimplifyMin(GetVal(info, trip, in_body, /* is_min= */ true)); in GetInductionRange()
372 HInductionVarAnalysis::InductionInfo* trip = nullptr; in IsUnitStride() local
373 if (HasInductionInfo(context, instruction, &loop, &info, &trip)) { in IsUnitStride()
396 HInductionVarAnalysis::InductionInfo *trip = in GenerateTripCount() local
398 if (trip != nullptr && !IsUnsafeTripCount(trip)) { in GenerateTripCount()
401 if (IsBodyTripCount(trip)) { in GenerateTripCount()
402 if (!GenerateCode(trip->op_b, nullptr, graph, block, &taken_test, false, false)) { in GenerateTripCount()
406 if (GenerateCode(trip->op_a, nullptr, graph, block, &trip_expr, false, false)) { in GenerateTripCount()
408 HInstruction* zero = graph->GetConstant(trip->type, 0); in GenerateTripCount()
425 HInductionVarAnalysis::InductionInfo *trip = in CheckForFiniteAndConstantProps() local
427 if (trip != nullptr && !IsUnsafeTripCount(trip)) { in CheckForFiniteAndConstantProps()
428 *is_constant = IsConstant(trip->op_a, kExact, trip_count); in CheckForFiniteAndConstantProps()
469 /*out*/ HInductionVarAnalysis::InductionInfo** trip) const { in HasInductionInfo()
478 *trip = induction_analysis_->LookupInfo(lp, GetLoopControl(lp)); in HasInductionInfo()
485 bool InductionVarRange::IsWellBehavedTripCount(HInductionVarAnalysis::InductionInfo* trip) const { in IsWellBehavedTripCount()
486 if (trip != nullptr) { in IsWellBehavedTripCount()
491 HInductionVarAnalysis::InductionInfo* lower = trip->op_b->op_a; in IsWellBehavedTripCount()
492 HInductionVarAnalysis::InductionInfo* upper = trip->op_b->op_b; in IsWellBehavedTripCount()
525 bool InductionVarRange::IsBodyTripCount(HInductionVarAnalysis::InductionInfo* trip) const { in IsBodyTripCount()
526 if (trip != nullptr) { in IsBodyTripCount()
527 if (trip->induction_class == HInductionVarAnalysis::kInvariant) { in IsBodyTripCount()
528 return trip->operation == HInductionVarAnalysis::kTripCountInBody || in IsBodyTripCount()
529 trip->operation == HInductionVarAnalysis::kTripCountInBodyUnsafe; in IsBodyTripCount()
535 bool InductionVarRange::IsUnsafeTripCount(HInductionVarAnalysis::InductionInfo* trip) const { in IsUnsafeTripCount()
536 if (trip != nullptr) { in IsUnsafeTripCount()
537 if (trip->induction_class == HInductionVarAnalysis::kInvariant) { in IsUnsafeTripCount()
538 return trip->operation == HInductionVarAnalysis::kTripCountInBodyUnsafe || in IsUnsafeTripCount()
539 trip->operation == HInductionVarAnalysis::kTripCountInLoopUnsafe; in IsUnsafeTripCount()
546 HInductionVarAnalysis::InductionInfo* trip, in GetLinear() argument
555 if (trip != nullptr) { in GetLinear()
556 HInductionVarAnalysis::InductionInfo* trip_expr = trip->op_a; in GetLinear()
565 trip->induction_class, in GetLinear()
566 trip->operation, in GetLinear()
568 trip->op_b, in GetLinear()
570 trip->type); in GetLinear()
571 return GetVal(&cancelled_trip, trip, in_body, is_min); in GetLinear()
583 trip->type); in GetLinear()
585 trip->induction_class, trip->operation, &neg, trip->op_b, nullptr, trip->type); in GetLinear()
586 return SubValue(Value(0), GetVal(&cancelled_trip, trip, in_body, !is_min)); in GetLinear()
593 return AddValue(GetMul(info->op_a, trip, trip, in_body, is_min), in GetLinear()
594 GetVal(info->op_b, trip, in_body, is_min)); in GetLinear()
598 … HInductionVarAnalysis::InductionInfo* trip, in GetPolynomial() argument
609 Value c = GetVal(info->op_b, trip, in_body, is_min); in GetPolynomial()
613 Value m = GetVal(trip, trip, in_body, is_min); in GetPolynomial()
624 HInductionVarAnalysis::InductionInfo* trip, in GetGeometric() argument
638 Value b = GetVal(info->op_b, trip, in_body, is_min); in GetGeometric()
646 HInductionVarAnalysis::InductionInfo* trip, in GetFetch() argument
651 if (chase_hint_ == nullptr && in_body && trip != nullptr && instruction == trip->op_a->fetch) { in GetFetch()
654 } else if (!instruction->IsConstant() && !IsUnsafeTripCount(trip)) { in GetFetch()
671 GetFetch(instruction->InputAt(1), trip, in_body, is_min)); in GetFetch()
673 return AddValue(GetFetch(instruction->InputAt(0), trip, in_body, is_min), in GetFetch()
680 GetFetch(instruction->InputAt(1), trip, in_body, !is_min)); in GetFetch()
682 return SubValue(GetFetch(instruction->InputAt(0), trip, in_body, is_min), in GetFetch()
690 return GetFetch(instruction->InputAt(0)->AsNewArray()->GetLength(), trip, in_body, is_min); in GetFetch()
697 return GetFetch(instruction->InputAt(0), trip, in_body, is_min); in GetFetch()
712 IsWellBehavedTripCount(trip) && in GetFetch()
721 HInductionVarAnalysis::InductionInfo* trip, in GetVal() argument
730 return AddValue(GetVal(info->op_a, trip, in_body, is_min), in GetVal()
731 GetVal(info->op_b, trip, in_body, is_min)); in GetVal()
733 return SubValue(GetVal(info->op_a, trip, in_body, is_min), in GetVal()
734 GetVal(info->op_b, trip, in_body, !is_min)); in GetVal()
737 GetVal(info->op_b, trip, in_body, !is_min)); in GetVal()
739 return GetMul(info->op_a, info->op_b, trip, in_body, is_min); in GetVal()
741 return GetDiv(info->op_a, info->op_b, trip, in_body, is_min); in GetVal()
747 return GetFetch(info->fetch, trip, in_body, is_min); in GetVal()
751 return GetVal(info->op_a, trip, in_body, is_min); in GetVal()
759 return SubValue(GetVal(info->op_a, trip, in_body, is_min), Value(1)); in GetVal()
767 return CorrectForType(GetLinear(info, trip, in_body, is_min), info->type); in GetVal()
769 return GetPolynomial(info, trip, in_body, is_min); in GetVal()
771 return GetGeometric(info, trip, in_body, is_min); in GetVal()
774 return MergeVal(GetVal(info->op_a, trip, in_body, is_min), in GetVal()
775 GetVal(info->op_b, trip, in_body, is_min), is_min); in GetVal()
783 HInductionVarAnalysis::InductionInfo* trip, in GetMul() argument
789 return MulRangeAndConstant(value, info2, trip, in_body, is_min); in GetMul()
791 return MulRangeAndConstant(value, info1, trip, in_body, is_min); in GetMul()
794 Value v1_min = GetVal(info1, trip, in_body, /* is_min= */ true); in GetMul()
795 Value v1_max = GetVal(info1, trip, in_body, /* is_min= */ false); in GetMul()
796 Value v2_min = GetVal(info2, trip, in_body, /* is_min= */ true); in GetMul()
797 Value v2_max = GetVal(info2, trip, in_body, /* is_min= */ false); in GetMul()
819 HInductionVarAnalysis::InductionInfo* trip, in GetDiv() argument
825 return DivRangeAndConstant(value, info1, trip, in_body, is_min); in GetDiv()
828 Value v1_min = GetVal(info1, trip, in_body, /* is_min= */ true); in GetDiv()
829 Value v1_max = GetVal(info1, trip, in_body, /* is_min= */ false); in GetDiv()
830 Value v2_min = GetVal(info2, trip, in_body, /* is_min= */ true); in GetDiv()
831 Value v2_max = GetVal(info2, trip, in_body, /* is_min= */ false); in GetDiv()
884 HInductionVarAnalysis::InductionInfo* trip, in MulRangeAndConstant() argument
889 return MulValue(GetVal(info, trip, in_body, is_min == value >= 0), c); in MulRangeAndConstant()
897 HInductionVarAnalysis::InductionInfo* trip, in DivRangeAndConstant() argument
902 return DivValue(GetVal(info, trip, in_body, is_min == value >= 0), c); in DivRangeAndConstant()
983 HInductionVarAnalysis::InductionInfo* trip = nullptr; in GenerateRangeOrLastValue() local
984 if (!HasInductionInfo(context, instruction, &loop, &info, &trip) || trip == nullptr) { in GenerateRangeOrLastValue()
994 *needs_finite_test = NeedsTripCount(info, stride_value) && IsUnsafeTripCount(trip); in GenerateRangeOrLastValue()
995 *needs_taken_test = IsBodyTripCount(trip); in GenerateRangeOrLastValue()
1008 return GenerateLastValuePolynomial(info, trip, graph, block, lower); in GenerateRangeOrLastValue()
1010 return GenerateLastValueGeometric(info, trip, graph, block, lower); in GenerateRangeOrLastValue()
1012 return GenerateLastValueWrapAround(info, trip, graph, block, lower); in GenerateRangeOrLastValue()
1014 return GenerateLastValuePeriodic(info, trip, graph, block, lower, needs_taken_test); in GenerateRangeOrLastValue()
1022 … return GenerateCode(trip->op_b, nullptr, graph, block, taken_test, in_body, /* is_min= */ false); in GenerateRangeOrLastValue()
1025 trip->op_b, nullptr, nullptr, nullptr, nullptr, in_body, /* is_min= */ false)) { in GenerateRangeOrLastValue()
1033 GenerateCode(info, trip, graph, block, lower, in_body, /* is_min= */ true)) && in GenerateRangeOrLastValue()
1035 GenerateCode(info, trip, graph, block, upper, in_body, /* is_min= */ false); in GenerateRangeOrLastValue()
1039 HInductionVarAnalysis::InductionInfo* trip, in GenerateLastValuePolynomial() argument
1051 IsConstant(trip->op_a, kExact, &m) && m >= 1) { in GenerateLastValuePolynomial()
1072 HInductionVarAnalysis::InductionInfo* trip, in GenerateLastValueGeometric() argument
1081 if (IsInt64AndGet(info->fetch, &f) && f >= 1 && IsConstant(trip->op_a, kExact, &m) && m >= 1) { in GenerateLastValueGeometric()
1124 HInductionVarAnalysis::InductionInfo* trip, in GenerateLastValueWrapAround() argument
1138 IsConstant(trip->op_a, kExact, &m) && m >= depth) { in GenerateLastValueWrapAround()
1145 HInductionVarAnalysis::InductionInfo* trip, in GenerateLastValuePeriodic() argument
1175 if (IsConstant(trip->op_a, kExact, &m) && m >= 1) { in GenerateLastValuePeriodic()
1191 GenerateCode(trip->op_a, nullptr, graph, block, graph ? &t : nullptr, false, false)) { in GenerateLastValuePeriodic()
1194 DataType::Type type = trip->type; in GenerateLastValuePeriodic()
1205 … if (GenerateCode(trip->op_b, nullptr, graph, block, graph ? &is_taken : nullptr, false, false)) { in GenerateLastValuePeriodic()
1221 HInductionVarAnalysis::InductionInfo* trip, in GenerateCode() argument
1251 if (GenerateCode(info->op_a, trip, graph, block, &opa, in_body, is_min) && in GenerateCode()
1252 GenerateCode(info->op_b, trip, graph, block, &opb, in_body, is_min)) { in GenerateCode()
1285 if (GenerateCode(info->op_b, trip, graph, block, &opb, in_body, !is_min)) { in GenerateCode()
1300 return GenerateCode(info->op_a, trip, graph, block, result, in_body, is_min); in GenerateCode()
1311 if (GenerateCode(info->op_a, trip, graph, block, &opb, in_body, is_min)) { in GenerateCode()
1332 if (!HInductionVarAnalysis::IsNarrowingLinear(info) && trip->type == type) { in GenerateCode()
1337 if (GenerateCode(trip, trip, graph, block, &opa, in_body, is_min_a) && in GenerateCode()
1338 GenerateCode(info->op_b, trip, graph, block, &opb, in_body, is_min)) { in GenerateCode()
1366 Value extreme = GetVal(info, trip, in_body, is_min); in GenerateCode()