Home | History | Annotate | Download | only in Core

Lines Matching defs:Range

1 //== RangeConstraintManager.cpp - Manage range constraints.------*- C++ -*--==//
27 /// A Range represents the closed range [from, to]. The caller must
28 /// guarantee that from <= to. Note that Range is immutable, so as not
31 class Range : public std::pair<const llvm::APSInt*,
34 Range(const llvm::APSInt &from, const llvm::APSInt &to)
58 class RangeTrait : public llvm::ImutContainerInfo<Range> {
60 // When comparing if one Range is less than another, we should compare
74 typedef llvm::ImmutableSet<Range, RangeTrait> PrimRangeSet;
88 for (const auto &range : ranges)
89 Ranges = F.add(Ranges, range);
100 : ranges(F.add(F.getEmptySet(), Range(from, to))) {}
120 // There are six cases for each range R in the set:
121 // 1. R is entirely before the intersection range.
122 // 2. R is entirely after the intersection range.
123 // 3. R contains the entire intersection range.
124 // 4. R starts before the intersection range and ends in the middle.
125 // 5. R starts in the middle of the intersection range and ends after it.
126 // 6. R is entirely contained in the intersection range.
138 newRanges = F.add(newRanges, Range(BV.getValue(Lower),
142 newRanges = F.add(newRanges, Range(BV.getValue(Lower), i->To()));
145 newRanges = F.add(newRanges, Range(i->From(), BV.getValue(Upper)));
159 // This function has nine cases, the cartesian product of range-testing
162 // The function returns false if the described range is entirely outside
163 // the range of values for the associated symbol.
172 // The entire range is outside the symbol's set of possible values.
173 // If this is a conventionally-ordered range, the state is infeasible.
177 // However, if the range wraps around, it spans all possible values.
182 // The range starts below what's possible but ends within it. Pin.
187 // The range spans all possible values for the symbol. Pin.
196 // The range wraps around, but all lower values are not possible.
201 // The range may or may not wrap around, but both limits are valid.
206 // The range starts within what's possible but ends above it. Pin.
215 // The range wraps but is outside the symbol's set of possible values.
218 // The range starts above what's possible but ends within it (wrap).
223 // The entire range is outside the symbol's set of possible values.
224 // If this is a conventionally-ordered range, the state is infeasible.
228 // However, if the range wraps around, it spans all possible values.
241 // the closed range [Lower, Upper]. Unlike the Range type, this range uses
244 // range is taken to wrap around. This is equivalent to taking the
260 // Therefore, the lower range most be handled first.
445 // "wraparound" range.
446 // As an example, the range [UINT_MAX-1, 3) contains five values: UINT_MAX-1,