Lines Matching refs:trip
210 HInductionVarAnalysis::InductionInfo* trip = nullptr; in GetInductionRange() local
211 if (!HasInductionInfo(context, instruction, &loop, &info, &trip)) { in GetInductionRange()
230 *min_val = SimplifyMin(GetVal(context, loop, info, trip, /*is_min=*/ true)); in GetInductionRange()
231 *max_val = SimplifyMax(GetVal(context, loop, info, trip, /*is_min=*/ false), chase_hint); in GetInductionRange()
233 NeedsTripCount(context, loop, info, &stride_value) && IsUnsafeTripCount(trip); in GetInductionRange()
237 *min_val = SimplifyMin(GetVal(context, loop, info, trip, /*is_min=*/ true)); in GetInductionRange()
396 HInductionVarAnalysis::InductionInfo* trip = nullptr; in IsUnitStride() local
397 if (HasInductionInfo(context, instruction, &loop, &info, &trip)) { in IsUnitStride()
421 HInductionVarAnalysis::InductionInfo *trip = induction_analysis_->LookupInfo(loop, loop_control); in GenerateTripCount() local
422 if (trip != nullptr && !IsUnsafeTripCount(trip)) { in GenerateTripCount()
426 if (IsBodyTripCount(trip)) { in GenerateTripCount()
429 trip->op_b, in GenerateTripCount()
440 trip->op_a, in GenerateTripCount()
447 HInstruction* zero = graph->GetConstant(trip->type, 0); in GenerateTripCount()
465 HInductionVarAnalysis::InductionInfo *trip = induction_analysis_->LookupInfo(loop, loop_control); in CheckForFiniteAndConstantProps() local
466 if (trip != nullptr && !IsUnsafeTripCount(trip)) { in CheckForFiniteAndConstantProps()
468 *is_constant = IsConstant(context, loop, trip->op_a, kExact, trip_count); in CheckForFiniteAndConstantProps()
511 /*out*/ HInductionVarAnalysis::InductionInfo** trip) const { in HasInductionInfo()
519 *trip = induction_analysis_->LookupInfo(lp, GetLoopControl(lp)); in HasInductionInfo()
528 HInductionVarAnalysis::InductionInfo* trip) const { in IsWellBehavedTripCount()
529 if (trip != nullptr) { in IsWellBehavedTripCount()
534 HInductionVarAnalysis::InductionInfo* lower = trip->op_b->op_a; in IsWellBehavedTripCount()
535 HInductionVarAnalysis::InductionInfo* upper = trip->op_b->op_b; in IsWellBehavedTripCount()
571 bool InductionVarRange::IsBodyTripCount(HInductionVarAnalysis::InductionInfo* trip) const { in IsBodyTripCount()
572 if (trip != nullptr) { in IsBodyTripCount()
573 if (trip->induction_class == HInductionVarAnalysis::kInvariant) { in IsBodyTripCount()
574 return trip->operation == HInductionVarAnalysis::kTripCountInBody || in IsBodyTripCount()
575 trip->operation == HInductionVarAnalysis::kTripCountInBodyUnsafe; in IsBodyTripCount()
581 bool InductionVarRange::IsUnsafeTripCount(HInductionVarAnalysis::InductionInfo* trip) const { in IsUnsafeTripCount()
582 if (trip != nullptr) { in IsUnsafeTripCount()
583 if (trip->induction_class == HInductionVarAnalysis::kInvariant) { in IsUnsafeTripCount()
584 return trip->operation == HInductionVarAnalysis::kTripCountInBodyUnsafe || in IsUnsafeTripCount()
585 trip->operation == HInductionVarAnalysis::kTripCountInLoopUnsafe; in IsUnsafeTripCount()
594 HInductionVarAnalysis::InductionInfo* trip, in GetLinear() argument
602 if (trip != nullptr) { in GetLinear()
603 HInductionVarAnalysis::InductionInfo* trip_expr = trip->op_a; in GetLinear()
612 trip->induction_class, in GetLinear()
613 trip->operation, in GetLinear()
615 trip->op_b, in GetLinear()
617 trip->type); in GetLinear()
618 return GetVal(context, loop, &cancelled_trip, trip, is_min); in GetLinear()
630 trip->type); in GetLinear()
632 trip->induction_class, trip->operation, &neg, trip->op_b, nullptr, trip->type); in GetLinear()
633 return SubValue(Value(0), GetVal(context, loop, &cancelled_trip, trip, !is_min)); in GetLinear()
640 return AddValue(GetMul(context, loop, info->op_a, trip, trip, is_min), in GetLinear()
641 GetVal(context, loop, info->op_b, trip, is_min)); in GetLinear()
648 HInductionVarAnalysis::InductionInfo* trip, in GetPolynomial() argument
664 Value c = GetVal(context, loop, info->op_b, trip, is_min); in GetPolynomial()
665 Value m = GetVal(context, loop, trip, trip, is_min); in GetPolynomial()
677 HInductionVarAnalysis::InductionInfo* trip, in GetGeometric() argument
690 Value b = GetVal(context, loop, info->op_b, trip, is_min); in GetGeometric()
700 HInductionVarAnalysis::InductionInfo* trip, in GetFetch() argument
706 trip != nullptr && in GetFetch()
707 instruction == trip->op_a->fetch) { in GetFetch()
710 } else if (!instruction->IsConstant() && !IsUnsafeTripCount(trip)) { in GetFetch()
727 GetFetch(context, loop, instruction->InputAt(1), trip, is_min)); in GetFetch()
729 return AddValue(GetFetch(context, loop, instruction->InputAt(0), trip, is_min), in GetFetch()
736 GetFetch(context, loop, instruction->InputAt(1), trip, !is_min)); in GetFetch()
738 return SubValue(GetFetch(context, loop, instruction->InputAt(0), trip, is_min), in GetFetch()
747 context, loop, instruction->InputAt(0)->AsNewArray()->GetLength(), trip, is_min); in GetFetch()
754 return GetFetch(context, loop, instruction->InputAt(0), trip, is_min); in GetFetch()
773 IsWellBehavedTripCount(context, next_loop, trip) && in GetFetch()
784 HInductionVarAnalysis::InductionInfo* trip, in GetVal() argument
792 return AddValue(GetVal(context, loop, info->op_a, trip, is_min), in GetVal()
793 GetVal(context, loop, info->op_b, trip, is_min)); in GetVal()
795 return SubValue(GetVal(context, loop, info->op_a, trip, is_min), in GetVal()
796 GetVal(context, loop, info->op_b, trip, !is_min)); in GetVal()
799 GetVal(context, loop, info->op_b, trip, !is_min)); in GetVal()
801 return GetMul(context, loop, info->op_a, info->op_b, trip, is_min); in GetVal()
803 return GetDiv(context, loop, info->op_a, info->op_b, trip, is_min); in GetVal()
809 return GetFetch(context, loop, info->fetch, trip, is_min); in GetVal()
814 return GetVal(context, loop, info->op_a, trip, /*is_min=*/ false); in GetVal()
822 return SubValue(GetVal(context, loop, info->op_a, trip, is_min), Value(1)); in GetVal()
830 return CorrectForType(GetLinear(context, loop, info, trip, is_min), info->type); in GetVal()
832 return GetPolynomial(context, loop, info, trip, is_min); in GetVal()
834 return GetGeometric(context, loop, info, trip, is_min); in GetVal()
837 return MergeVal(GetVal(context, loop, info->op_a, trip, is_min), in GetVal()
838 GetVal(context, loop, info->op_b, trip, is_min), in GetVal()
849 HInductionVarAnalysis::InductionInfo* trip, in GetMul() argument
854 return MulRangeAndConstant(context, loop, value, info2, trip, is_min); in GetMul()
856 return MulRangeAndConstant(context, loop, value, info1, trip, is_min); in GetMul()
859 Value v1_min = GetVal(context, loop, info1, trip, /*is_min=*/ true); in GetMul()
860 Value v1_max = GetVal(context, loop, info1, trip, /*is_min=*/ false); in GetMul()
861 Value v2_min = GetVal(context, loop, info2, trip, /*is_min=*/ true); in GetMul()
862 Value v2_max = GetVal(context, loop, info2, trip, /*is_min=*/ false); in GetMul()
886 HInductionVarAnalysis::InductionInfo* trip, in GetDiv() argument
891 return DivRangeAndConstant(context, loop, value, info1, trip, is_min); in GetDiv()
894 Value v1_min = GetVal(context, loop, info1, trip, /*is_min=*/ true); in GetDiv()
895 Value v1_max = GetVal(context, loop, info1, trip, /*is_min=*/ false); in GetDiv()
896 Value v2_min = GetVal(context, loop, info2, trip, /*is_min=*/ true); in GetDiv()
897 Value v2_max = GetVal(context, loop, info2, trip, /*is_min=*/ false); in GetDiv()
959 HInductionVarAnalysis::InductionInfo* trip, in MulRangeAndConstant() argument
963 return MulValue(GetVal(context, loop, info, trip, is_min == value >= 0), c); in MulRangeAndConstant()
973 HInductionVarAnalysis::InductionInfo* trip, in DivRangeAndConstant() argument
977 return DivValue(GetVal(context, loop, info, trip, is_min == value >= 0), c); in DivRangeAndConstant()
1058 HInductionVarAnalysis::InductionInfo* trip = nullptr; in GenerateRangeOrLastValue() local
1059 if (!HasInductionInfo(context, instruction, &loop, &info, &trip) || trip == nullptr) { in GenerateRangeOrLastValue()
1068 *needs_finite_test = NeedsTripCount(context, loop, info, stride_value) && IsUnsafeTripCount(trip); in GenerateRangeOrLastValue()
1069 *needs_taken_test = IsBodyTripCount(trip); in GenerateRangeOrLastValue()
1078 context, loop, info, trip, graph, block, /*is_min=*/false, upper, needs_taken_test); in GenerateRangeOrLastValue()
1082 context, loop, info, trip, graph, block, /*is_min=*/true, lower, needs_taken_test); in GenerateRangeOrLastValue()
1085 return GenerateLastValuePolynomial(context, loop, info, trip, graph, block, lower); in GenerateRangeOrLastValue()
1087 return GenerateLastValueGeometric(context, loop, info, trip, graph, block, lower); in GenerateRangeOrLastValue()
1089 return GenerateLastValueWrapAround(context, loop, info, trip, graph, block, lower); in GenerateRangeOrLastValue()
1092 context, loop, info, trip, graph, block, lower, needs_taken_test); in GenerateRangeOrLastValue()
1102 trip->op_b, in GenerateRangeOrLastValue()
1111 trip->op_b, in GenerateRangeOrLastValue()
1124 GenerateCode(context, loop, info, trip, graph, block, /*is_min=*/ true, lower)) && in GenerateRangeOrLastValue()
1126 GenerateCode(context, loop, info, trip, graph, block, /*is_min=*/ false, upper); in GenerateRangeOrLastValue()
1132 HInductionVarAnalysis::InductionInfo* trip, in GenerateLastValueLinear() argument
1141 if (HInductionVarAnalysis::IsNarrowingLinear(info) || trip->type != type) { in GenerateLastValueLinear()
1159 trip, in GenerateLastValueLinear()
1160 trip, in GenerateLastValueLinear()
1166 !GenerateCode(context, loop, info->op_b, trip, graph, block, is_min, &opb)) { in GenerateLastValueLinear()
1187 if (TryGenerateTakenTest(context, loop, trip->op_b, graph, block, result, opb)) { in GenerateLastValueLinear()
1200 HInductionVarAnalysis::InductionInfo* trip, in GenerateLastValuePolynomial() argument
1212 IsConstant(context, loop, trip->op_a, kExact, &m) && in GenerateLastValuePolynomial()
1243 HInductionVarAnalysis::InductionInfo* trip, in GenerateLastValueGeometric() argument
1254 IsConstant(context, loop, trip->op_a, kExact, &m) && in GenerateLastValueGeometric()
1302 HInductionVarAnalysis::InductionInfo* trip, in GenerateLastValueWrapAround() argument
1316 IsConstant(context, loop, trip->op_a, kExact, &m) && in GenerateLastValueWrapAround()
1327 HInductionVarAnalysis::InductionInfo* trip, in GenerateLastValuePeriodic() argument
1357 if (IsConstant(context, loop, trip->op_a, kExact, &m) && m >= 1) { in GenerateLastValuePeriodic()
1376 return IsConstant(context, loop, trip->op_a->op_b, kExact, &stride_value) && in GenerateLastValuePeriodic()
1399 trip->op_a, in GenerateLastValuePeriodic()
1408 DataType::Type type = trip->type; in GenerateLastValuePeriodic()
1418 if (TryGenerateTakenTest(context, loop, trip->op_b, graph, block, result, x)) { in GenerateLastValuePeriodic()
1432 HInductionVarAnalysis::InductionInfo* trip, in GenerateCode() argument
1465 trip, in GenerateCode()
1474 trip, in GenerateCode()
1532 trip, in GenerateCode()
1556 trip, in GenerateCode()
1576 trip, in GenerateCode()
1612 if (!HInductionVarAnalysis::IsNarrowingLinear(info) && trip->type == type) { in GenerateCode()
1619 trip, in GenerateCode()
1620 trip, in GenerateCode()
1629 trip, in GenerateCode()
1662 Value extreme = GetVal(context, loop, info, trip, is_min); in GenerateCode()