Lines Matching full:ranges
44 if (empty() || Ranges.back().getUpper().slt(NewRange.getLower())) { in insert()
45 Ranges.push_back(NewRange); in insert()
48 if (NewRange.getUpper().slt(Ranges.front().getLower())) { in insert()
49 Ranges.insert(Ranges.begin(), NewRange); in insert()
54 Ranges, NewRange, [](const ConstantRange &a, const ConstantRange &b) { in insert()
57 if (LowerBound != Ranges.end() && LowerBound->contains(NewRange)) in insert()
61 SmallVector<ConstantRange, 2> ExistingTail(LowerBound, Ranges.end()); in insert()
62 Ranges.erase(LowerBound, Ranges.end()); in insert()
63 // Merge consecutive ranges. in insert()
64 if (!Ranges.empty() && NewRange.getLower().sle(Ranges.back().getUpper())) { in insert()
65 APInt NewLower = Ranges.back().getLower(); in insert()
67 APIntOps::smax(NewRange.getUpper(), Ranges.back().getUpper()); in insert()
68 Ranges.back() = ConstantRange(NewLower, NewUpper); in insert()
70 Ranges.push_back(NewRange); in insert()
73 if (Ranges.back().getUpper().slt(Iter->getLower())) { in insert()
74 Ranges.push_back(*Iter); in insert()
76 APInt NewLower = Ranges.back().getLower(); in insert()
78 APIntOps::smax(Iter->getUpper(), Ranges.back().getUpper()); in insert()
79 Ranges.back() = ConstantRange(NewLower, NewUpper); in insert()
91 if (Ranges.back().getUpper().sle(SubRange.getLower())) in subtract()
93 if (SubRange.getUpper().sle(Ranges.front().getLower())) in subtract()
101 for (auto &Range : Ranges) { in subtract()
140 Ranges = Result; in subtract()
158 if (Ranges[i].getLower().slt(CRL.Ranges[j].getLower())) { in unionWith()
159 PreviousRange = Ranges[i++]; in unionWith()
161 PreviousRange = CRL.Ranges[j++]; in unionWith()
171 Result.Ranges.push_back(PreviousRange); in unionWith()
181 (i < size() && Ranges[i].getLower().slt(CRL.Ranges[j].getLower()))) { in unionWith()
183 UnionAndUpdateRange(Ranges[i++]); in unionWith()
186 UnionAndUpdateRange(CRL.Ranges[j++]); in unionWith()
189 Result.Ranges.push_back(PreviousRange); in unionWith()
207 auto &Range = this->Ranges[i]; in intersectWith()
208 auto &OtherRange = CRL.Ranges[j]; in intersectWith()
210 // The intersection of two Ranges is (max(lowers), min(uppers)), and it's in intersectWith()
214 // considers the complex upper wrapped case and may result two ranges, in intersectWith()
219 Result.Ranges.push_back(ConstantRange(Start, End)); in intersectWith()
233 interleaveComma(Ranges, OS, [&](ConstantRange CR) { in print()