20#define DEBUG_TYPE "Range"
32 <<
"Range: [" <<
hexValue(RangeEntry.lower()) <<
":"
33 <<
hexValue(RangeEntry.upper()) <<
"]\n";
36 RangesTree.
insert(RangeEntry.lower(), RangeEntry.upper(),
44 dbgs() <<
"\nRanges Tree:\n";
55 if (LowerAddress > UpperAddress)
59 if (LowerAddress < Lower)
61 if (UpperAddress > Upper)
65 RangeEntries.emplace_back(LowerAddress, UpperAddress,
Scope);
90 for (LVRangesTree::find_iterator Iter = RangesTree.
find(
Address),
92 Iter !=
End; ++Iter) {
94 {
dbgs() <<
format(
"[0x%08x,0x%08x] ", Iter->left(), Iter->right()); });
95 Scope = Iter->value();
97 if (Level > TargetLevel) {
112 if (LowerAddress >= RangeEntry.lower() && UpperAddress < RangeEntry.upper())
113 return RangeEntry.scope();
120 if (LowerAddress == RangeEntry.lower() &&
121 UpperAddress == RangeEntry.upper())
130 if (lhs.
lower() < rhs.lower())
135 if (lhs.
lower() == rhs.lower())
136 return lhs.
upper() < rhs.upper();
142 std::stable_sort(RangeEntries.begin(), RangeEntries.end(), CompareRangeEntry);
146 size_t Indentation = 0;
153 OS <<
format(
"[0x%08x,0x%08x] ", RangeEntry.lower(), RangeEntry.upper())
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void clear()
Remove all entries.
void print(raw_ostream &OS, bool HexFormat=true)
Print the interval tree.
void insert(PointType Left, PointType Right, ValueType Value)
Add a mapping of [Left;Right] to Value.
find_iterator find_end() const
Iterator to end find operation.
void create()
Create the interval tree.
find_iterator find(PointType Point) const
Iterator to start a find operation; it returns find_end() if the tree has not been built.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Target - Wrapper for Target specific information.
StringRef getName() const override
void printAttributes(raw_ostream &OS, bool Full=true) const
size_t indentationSize() const
LVScope * getEntry(LVAddress Address) const
bool hasEntry(LVAddress Low, LVAddress High) const
void printExtra(raw_ostream &OS, bool Full=true) const override
void print(raw_ostream &OS, bool Full=true) const override
void addEntry(LVScope *Scope, LVAddress LowerAddress, LVAddress UpperAddress)
const char * kind() const override
const LVLocations * getRanges() const
This class implements an extremely fast bulk output stream that can only output to a stream.
FormattedNumber hexValue(uint64_t N, unsigned Width=HEX_WIDTH, bool Upper=false)
std::string formattedKind(StringRef Kind)
std::string formattedName(StringRef Name)
This is an optimization pass for GlobalISel generic memory operations.
FormattedNumber format_decimal(int64_t N, unsigned Width)
format_decimal - Output N as a right justified, fixed-width decimal.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.