|
LLVM
10.0.0
|
#include "CodeGen/AllocationOrder.h"
Public Member Functions | |
| AllocationOrder (unsigned VirtReg, const VirtRegMap &VRM, const RegisterClassInfo &RegClassInfo, const LiveRegMatrix *Matrix) | |
| Create a new AllocationOrder for VirtReg. More... | |
| ArrayRef< MCPhysReg > | getOrder () const |
| Get the allocation order without reordered hints. More... | |
| unsigned | next (unsigned Limit=0) |
| Return the next physical register in the allocation order, or 0. More... | |
| unsigned | nextWithDups (unsigned Limit) |
| As next(), but allow duplicates to be returned, and stop before the Limit'th register in the RegisterClassInfo allocation order. More... | |
| void | rewind () |
| Start over from the beginning. More... | |
| bool | isHint () const |
| Return true if the last register returned from next() was a preferred register. More... | |
| bool | isHint (unsigned PhysReg) const |
| Return true if PhysReg is a preferred register. More... | |
Definition at line 29 of file AllocationOrder.h.
| AllocationOrder::AllocationOrder | ( | unsigned | VirtReg, |
| const VirtRegMap & | VRM, | ||
| const RegisterClassInfo & | RegClassInfo, | ||
| const LiveRegMatrix * | Matrix | ||
| ) |
Create a new AllocationOrder for VirtReg.
| VirtReg | Virtual register to allocate for. |
| VRM | Virtual register map for function. |
| RegClassInfo | Information about reserved and allocatable registers. |
Definition at line 29 of file AllocationOrder.cpp.
References assert(), llvm::dbgs(), E, llvm::VirtRegMap::getMachineFunction(), llvm::RegisterClassInfo::getOrder(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::VirtRegMap::getTargetRegInfo(), I, llvm::is_contained(), LLVM_DEBUG, llvm::printReg(), rewind(), and TRI.
Get the allocation order without reordered hints.
Definition at line 49 of file AllocationOrder.h.
|
inline |
Return true if the last register returned from next() was a preferred register.
Definition at line 87 of file AllocationOrder.h.
Referenced by llvm::createGreedyRegisterAllocator().
Return true if PhysReg is a preferred register.
Definition at line 90 of file AllocationOrder.h.
References llvm::is_contained().
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.
Definition at line 54 of file AllocationOrder.h.
References Reg, and llvm::ArrayRef< T >::size().
Referenced by llvm::createGreedyRegisterAllocator(), getNumAllocatableRegsForConstraints(), and hasTiedDef().
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.
Definition at line 73 of file AllocationOrder.h.
|
inline |
Start over from the beginning.
Definition at line 84 of file AllocationOrder.h.
Referenced by AllocationOrder(), llvm::createGreedyRegisterAllocator(), getNumAllocatableRegsForConstraints(), and hasTiedDef().
1.8.13