Lines Matching refs:EndPoints
425 static bool tryMergeRange(SmallVectorImpl<Value *> &EndPoints, ConstantInt *Low, in tryMergeRange() argument
428 unsigned Size = EndPoints.size(); in tryMergeRange()
429 APInt LB = cast<ConstantInt>(EndPoints[Size - 2])->getValue(); in tryMergeRange()
430 APInt LE = cast<ConstantInt>(EndPoints[Size - 1])->getValue(); in tryMergeRange()
435 EndPoints[Size - 2] = ConstantInt::get(Ty, Union.getLower()); in tryMergeRange()
436 EndPoints[Size - 1] = ConstantInt::get(Ty, Union.getUpper()); in tryMergeRange()
442 static void addRange(SmallVectorImpl<Value *> &EndPoints, ConstantInt *Low, in addRange() argument
444 if (!EndPoints.empty()) in addRange()
445 if (tryMergeRange(EndPoints, Low, High)) in addRange()
448 EndPoints.push_back(Low); in addRange()
449 EndPoints.push_back(High); in addRange()
465 SmallVector<Value*, 4> EndPoints; in getMostGenericRange() local
475 addRange(EndPoints, ALow, cast<ConstantInt>(A->getOperand(2 * AI + 1))); in getMostGenericRange()
478 addRange(EndPoints, BLow, cast<ConstantInt>(B->getOperand(2 * BI + 1))); in getMostGenericRange()
483 addRange(EndPoints, cast<ConstantInt>(A->getOperand(2 * AI)), in getMostGenericRange()
488 addRange(EndPoints, cast<ConstantInt>(B->getOperand(2 * BI)), in getMostGenericRange()
495 unsigned Size = EndPoints.size(); in getMostGenericRange()
497 ConstantInt *FB = cast<ConstantInt>(EndPoints[0]); in getMostGenericRange()
498 ConstantInt *FE = cast<ConstantInt>(EndPoints[1]); in getMostGenericRange()
499 if (tryMergeRange(EndPoints, FB, FE)) { in getMostGenericRange()
501 EndPoints[i] = EndPoints[i + 2]; in getMostGenericRange()
503 EndPoints.resize(Size - 2); in getMostGenericRange()
509 if (EndPoints.size() == 2) { in getMostGenericRange()
510 ConstantRange Range(cast<ConstantInt>(EndPoints[0])->getValue(), in getMostGenericRange()
511 cast<ConstantInt>(EndPoints[1])->getValue()); in getMostGenericRange()
516 return MDNode::get(A->getContext(), EndPoints); in getMostGenericRange()