LLVM API Documentation
#include <RegAllocBase.h>
Static Public Attributes | |
static bool | VerifyEnabled = false |
VerifyEnabled - True when -verify-regalloc is given. | |
Protected Member Functions | |
RegAllocBase () | |
virtual | ~RegAllocBase () |
void | init (VirtRegMap &vrm, LiveIntervals &lis, LiveRegMatrix &mat) |
void | allocatePhysRegs () |
virtual Spiller & | spiller ()=0 |
virtual void | enqueue (LiveInterval *LI)=0 |
enqueue - Add VirtReg to the priority queue of unassigned registers. | |
virtual LiveInterval * | dequeue ()=0 |
dequeue - Return the next unassigned register, or NULL. | |
virtual unsigned | selectOrSplit (LiveInterval &VirtReg, SmallVectorImpl< unsigned > &splitLVRs)=0 |
Protected Attributes | |
const TargetRegisterInfo * | TRI |
MachineRegisterInfo * | MRI |
VirtRegMap * | VRM |
LiveIntervals * | LIS |
LiveRegMatrix * | Matrix |
RegisterClassInfo | RegClassInfo |
Static Protected Attributes | |
static const char | TimerGroupName [] = "Register Allocation" |
RegAllocBase provides the register allocation driver and interface that can be extended to add interesting heuristics.
Register allocators must override the selectOrSplit() method to implement live range splitting. They must also override enqueue/dequeue to provide an assignment order.
Definition at line 58 of file RegAllocBase.h.
llvm::RegAllocBase::RegAllocBase | ( | ) | [inline, protected] |
Definition at line 68 of file RegAllocBase.h.
virtual llvm::RegAllocBase::~RegAllocBase | ( | ) | [inline, protected, virtual] |
Definition at line 71 of file RegAllocBase.h.
void RegAllocBase::allocatePhysRegs | ( | ) | [protected] |
Definition at line 84 of file RegAllocBase.cpp.
References llvm::LiveRegMatrix::assign(), llvm::VirtRegMap::assignVirt2Phys(), llvm::dbgs(), DEBUG, dequeue(), llvm::MachineInstr::emitError(), enqueue(), llvm::LiveIntervals::getInterval(), llvm::TargetRegisterClass::getName(), llvm::RegisterClassInfo::getOrder(), llvm::MachineRegisterInfo::getRegClass(), llvm::VirtRegMap::hasPhys(), I, llvm::LiveRegMatrix::invalidateVirtRegs(), llvm::MachineInstr::isInlineAsm(), llvm::TargetRegisterInfo::isVirtualRegister(), LIS, Matrix, llvm::AArch64CC::MI, MRI, llvm::LiveInterval::reg, llvm::MachineRegisterInfo::reg_instr_begin(), llvm::MachineRegisterInfo::reg_instr_end(), llvm::MachineRegisterInfo::reg_nodbg_empty(), RegClassInfo, llvm::LiveIntervals::removeInterval(), llvm::report_fatal_error(), selectOrSplit(), and VRM.
virtual LiveInterval* llvm::RegAllocBase::dequeue | ( | ) | [protected, pure virtual] |
dequeue - Return the next unassigned register, or NULL.
Referenced by allocatePhysRegs().
virtual void llvm::RegAllocBase::enqueue | ( | LiveInterval * | LI | ) | [protected, pure virtual] |
enqueue - Add VirtReg to the priority queue of unassigned registers.
Referenced by allocatePhysRegs().
void RegAllocBase::init | ( | VirtRegMap & | vrm, |
LiveIntervals & | lis, | ||
LiveRegMatrix & | mat | ||
) | [protected] |
Definition at line 57 of file RegAllocBase.cpp.
References llvm::MachineRegisterInfo::freezeReservedRegs(), llvm::VirtRegMap::getMachineFunction(), llvm::VirtRegMap::getRegInfo(), llvm::VirtRegMap::getTargetRegInfo(), LIS, Matrix, MRI, RegClassInfo, llvm::RegisterClassInfo::runOnMachineFunction(), TRI, and VRM.
virtual unsigned llvm::RegAllocBase::selectOrSplit | ( | LiveInterval & | VirtReg, |
SmallVectorImpl< unsigned > & | splitLVRs | ||
) | [protected, pure virtual] |
Referenced by allocatePhysRegs().
virtual Spiller& llvm::RegAllocBase::spiller | ( | ) | [protected, pure virtual] |
LiveIntervals* llvm::RegAllocBase::LIS [protected] |
Definition at line 64 of file RegAllocBase.h.
Referenced by allocatePhysRegs(), and init().
LiveRegMatrix* llvm::RegAllocBase::Matrix [protected] |
Definition at line 65 of file RegAllocBase.h.
Referenced by allocatePhysRegs(), and init().
MachineRegisterInfo* llvm::RegAllocBase::MRI [protected] |
Definition at line 62 of file RegAllocBase.h.
Referenced by allocatePhysRegs(), and init().
RegisterClassInfo llvm::RegAllocBase::RegClassInfo [protected] |
Definition at line 66 of file RegAllocBase.h.
Referenced by allocatePhysRegs(), and init().
const char RegAllocBase::TimerGroupName = "Register Allocation" [static, protected] |
Definition at line 97 of file RegAllocBase.h.
const TargetRegisterInfo* llvm::RegAllocBase::TRI [protected] |
Definition at line 61 of file RegAllocBase.h.
Referenced by init().
bool RegAllocBase::VerifyEnabled = false [static] |
VerifyEnabled - True when -verify-regalloc is given.
Definition at line 101 of file RegAllocBase.h.
VirtRegMap* llvm::RegAllocBase::VRM [protected] |
Definition at line 63 of file RegAllocBase.h.
Referenced by allocatePhysRegs(), and init().