21 if (Range.
size() == 0)
26 while (It2 !=
Ranges.end() && It2->Start < Range.
End)
30 It =
Ranges.erase(It, It2);
32 if (It !=
Ranges.begin() && Range.
Start < It[-1].End)
42 return It !=
Ranges.begin() &&
Addr < It[-1].End;
46 if (Range.
size() == 0)
53 return Range.
End <= It[-1].End;
67 return OS <<
'[' <<
HEX64(R.Start) <<
" - " <<
HEX64(R.End) <<
")";
72 for (
size_t I = 0;
I <
Size; ++
I) {
82 O.writeULEB(
Start - BaseAddr);
88 const uint64_t AddrOffset =
Data.getULEB128(&
Offset);
90 const uint64_t StartAddr = BaseAddr + AddrOffset;
100 Range.encode(
O, BaseAddr);
106 uint64_t NumRanges =
Data.getULEB128(&
Offset);
110 for (
auto &Range :
Ranges)
120 uint64_t NumRanges =
Data.getULEB128(&
Offset);
121 for (uint64_t
I=0;
I<NumRanges; ++
I)
static uint64_t skip(DataExtractor &Data, uint64_t &Offset)
Skip an address range object in the specified data a the specified offset.
This class represents lattice values for constants.
void encode(FileWriter &O, uint64_t BaseAddr) const
bool contains(uint64_t Addr) const
void decode(DataExtractor &Data, uint64_t BaseAddr, uint64_t &Offset)
AddressRange objects are encoded and decoded to be relative to a base address.
The AddressRanges class helps normalize address range collections.
Optional< AddressRange > getRangeThatContains(uint64_t Addr) const
auto upper_bound(R &&Range, T &&Value)
Provide wrappers to std::upper_bound which take ranges instead of having to pass begin/end explicitly...
auto partition_point(R &&Range, Predicate P)
Binary search for the first iterator in a range where a predicate is false.
A simplified binary data writer class that doesn't require targets, target definitions,...
A class that represents an address range.
void insert(AddressRange Range)
Align max(MaybeAlign Lhs, Align Rhs)
void encode(FileWriter &O, uint64_t BaseAddr) const
void decode(DataExtractor &Data, uint64_t BaseAddr, uint64_t &Offset)
Address ranges are decoded and encoded to be relative to a base address.
static void skip(DataExtractor &Data, uint64_t &Offset)
Skip an address range object in the specified data a the specified offset.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & operator<<(raw_ostream &OS, const FunctionInfo &R)