17 #ifndef LLVM_LIB_CODEGEN_ALLOCATIONORDER_H 18 #define LLVM_LIB_CODEGEN_ALLOCATIONORDER_H 26 class RegisterClassInfo;
55 unsigned next(
unsigned Limit = 0) {
57 return Hints.end()[Pos++];
62 while (Pos <
int(Limit)) {
63 unsigned Reg = Order[Pos++];
76 return Hints.end()[Pos++];
85 void rewind() { Pos = -int(Hints.size()); }
88 bool isHint()
const {
return Pos <= 0; }
bool isHint() const
Return true if the last register returned from next() was a preferred register.
void rewind()
Start over from the beginning.
This class represents lattice values for constants.
unsigned next(unsigned Limit=0)
Return the next physical register in the allocation order, or 0.
unsigned nextWithDups(unsigned Limit)
As next(), but allow duplicates to be returned, and stop before the Limit'th register in the Register...
bool isHint(unsigned PhysReg) const
Return true if PhysReg is a preferred register.
size_t size() const
size - Get the array size.
ArrayRef< MCPhysReg > getOrder() const
Get the allocation order without reordered hints.
#define LLVM_LIBRARY_VISIBILITY
LLVM_LIBRARY_VISIBILITY - If a class marked with this attribute is linked into a shared library...
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.