Home | History | Annotate | Download | only in IR

Lines Matching full:endpoints

922 static bool tryMergeRange(SmallVectorImpl<ConstantInt *> &EndPoints,
925 unsigned Size = EndPoints.size();
926 APInt LB = EndPoints[Size - 2]->getValue();
927 APInt LE = EndPoints[Size - 1]->getValue();
932 EndPoints[Size - 2] =
934 EndPoints[Size - 1] =
941 static void addRange(SmallVectorImpl<ConstantInt *> &EndPoints,
943 if (!EndPoints.empty())
944 if (tryMergeRange(EndPoints, Low, High))
947 EndPoints.push_back(Low);
948 EndPoints.push_back(High);
964 SmallVector<ConstantInt *, 4> EndPoints;
974 addRange(EndPoints, ALow,
978 addRange(EndPoints, BLow,
984 addRange(EndPoints, mdconst::extract<ConstantInt>(A->getOperand(2 * AI)),
989 addRange(EndPoints, mdconst::extract<ConstantInt>(B->getOperand(2 * BI)),
994 // If we have more than 2 ranges (4 endpoints) we have to try to merge
996 unsigned Size = EndPoints.size();
998 ConstantInt *FB = EndPoints[0];
999 ConstantInt *FE = EndPoints[1];
1000 if (tryMergeRange(EndPoints, FB, FE)) {
1002 EndPoints[i] = EndPoints[i + 2];
1004 EndPoints.resize(Size - 2);
1010 if (EndPoints.size() == 2) {
1011 ConstantRange Range(EndPoints[0]->getValue(), EndPoints[1]->getValue());
1017 MDs.reserve(EndPoints.size());
1018 for (auto *I : EndPoints)