class AllocationOrder
Declaration
class AllocationOrder { /* full declaration omitted */ };
Declared at: llvm/lib/CodeGen/AllocationOrder.h:29
Method Overview
- public AllocationOrder(unsigned int VirtReg, const llvm::VirtRegMap & VRM, const llvm::RegisterClassInfo & RegClassInfo, const llvm::LiveRegMatrix * Matrix)
- public ArrayRef<llvm::MCPhysReg> getOrder() const
- public bool isHint() const
- public bool isHint(unsigned int PhysReg) const
- public unsigned int next(unsigned int Limit = 0)
- public unsigned int nextWithDups(unsigned int Limit)
- public void rewind()
Methods
¶AllocationOrder(
unsigned int VirtReg,
const llvm::VirtRegMap& VRM,
const llvm::RegisterClassInfo& RegClassInfo,
const llvm::LiveRegMatrix* Matrix)
AllocationOrder(
unsigned int VirtReg,
const llvm::VirtRegMap& VRM,
const llvm::RegisterClassInfo& RegClassInfo,
const llvm::LiveRegMatrix* Matrix)
Description
Create a new AllocationOrder for VirtReg.
Declared at: llvm/lib/CodeGen/AllocationOrder.h:43
Parameters
- unsigned int VirtReg
- Virtual register to allocate for.
- const llvm::VirtRegMap& VRM
- Virtual register map for function.
- const llvm::RegisterClassInfo& RegClassInfo
- Information about reserved and allocatable registers.
- const llvm::LiveRegMatrix* Matrix
¶ArrayRef<llvm::MCPhysReg> getOrder() const
ArrayRef<llvm::MCPhysReg> getOrder() const
Description
Get the allocation order without reordered hints.
Declared at: llvm/lib/CodeGen/AllocationOrder.h:49
¶bool isHint() const
bool isHint() const
Description
Return true if the last register returned from next() was a preferred register.
Declared at: llvm/lib/CodeGen/AllocationOrder.h:87
¶bool isHint(unsigned int PhysReg) const
bool isHint(unsigned int PhysReg) const
Description
Return true if PhysReg is a preferred register.
Declared at: llvm/lib/CodeGen/AllocationOrder.h:90
Parameters
- unsigned int PhysReg
¶unsigned int next(unsigned int Limit = 0)
unsigned int next(unsigned int Limit = 0)
Description
Return the next physical register in the allocation order, or 0. It is safe to call next() again after it returned 0, it will keep returning 0 until rewind() is called.
Declared at: llvm/lib/CodeGen/AllocationOrder.h:54
Parameters
- unsigned int Limit = 0
¶unsigned int nextWithDups(unsigned int Limit)
unsigned int nextWithDups(unsigned int Limit)
Description
As next(), but allow duplicates to be returned, and stop before the Limit'th register in the RegisterClassInfo allocation order. This can produce more than Limit registers if there are hints.
Declared at: llvm/lib/CodeGen/AllocationOrder.h:73
Parameters
- unsigned int Limit
¶void rewind()
void rewind()
Description
Start over from the beginning.
Declared at: llvm/lib/CodeGen/AllocationOrder.h:84