class RegAllocBase
Declaration
class RegAllocBase { /* full declaration omitted */ };
Description
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.
Declared at: llvm/lib/CodeGen/RegAllocBase.h:60
Member Variables
- protected const llvm::TargetRegisterInfo* TRI = nullptr
- protected llvm::MachineRegisterInfo* MRI = nullptr
- protected llvm::VirtRegMap* VRM = nullptr
- protected llvm::LiveIntervals* LIS = nullptr
- protected llvm::LiveRegMatrix* Matrix = nullptr
- protected llvm::RegisterClassInfo RegClassInfo
- protected SmallPtrSet<llvm::MachineInstr*, 32> DeadRemats
- Inst which is a def of an original reg and whose defs are already all dead after remat is saved in DeadRemats. The deletion of such inst is postponed till all the allocations are done, so its remat expr is always available for the remat of all the siblings of the original reg.
- protected static const char[] TimerGroupName
- protected static const char[] TimerGroupDescription
- public static bool VerifyEnabled
- VerifyEnabled - True when -verify-regalloc is given.
Method Overview
- protected RegAllocBase()
- protected virtual void aboutToRemoveInterval(llvm::LiveInterval & LI)
- protected void allocatePhysRegs()
- protected virtual llvm::LiveInterval * dequeue()
- protected virtual void enqueue(llvm::LiveInterval * LI)
- protected void init(llvm::VirtRegMap & vrm, llvm::LiveIntervals & lis, llvm::LiveRegMatrix & mat)
- protected virtual void postOptimization()
- protected virtual unsigned int selectOrSplit(llvm::LiveInterval & VirtReg, SmallVectorImpl<unsigned int> & splitLVRs)
- protected virtual llvm::Spiller & spiller()
- protected virtual ~RegAllocBase()
Methods
¶RegAllocBase()
RegAllocBase()
Declared at: llvm/lib/CodeGen/RegAllocBase.h:77
¶virtual void aboutToRemoveInterval(
llvm::LiveInterval& LI)
virtual void aboutToRemoveInterval(
llvm::LiveInterval& LI)
Description
Method called when the allocator is about to remove a LiveInterval.
Declared at: llvm/lib/CodeGen/RegAllocBase.h:112
Parameters
¶void allocatePhysRegs()
void allocatePhysRegs()
Declared at: llvm/lib/CodeGen/RegAllocBase.h:85
¶virtual llvm::LiveInterval* dequeue()
virtual llvm::LiveInterval* dequeue()
Description
dequeue - Return the next unassigned register, or NULL.
Declared at: llvm/lib/CodeGen/RegAllocBase.h:98
¶virtual void enqueue(llvm::LiveInterval* LI)
virtual void enqueue(llvm::LiveInterval* LI)
Description
enqueue - Add VirtReg to the priority queue of unassigned registers.
Declared at: llvm/lib/CodeGen/RegAllocBase.h:95
Parameters
¶void init(llvm::VirtRegMap& vrm,
llvm::LiveIntervals& lis,
llvm::LiveRegMatrix& mat)
void init(llvm::VirtRegMap& vrm,
llvm::LiveIntervals& lis,
llvm::LiveRegMatrix& mat)
Declared at: llvm/lib/CodeGen/RegAllocBase.h:81
Parameters
- llvm::VirtRegMap& vrm
- llvm::LiveIntervals& lis
- llvm::LiveRegMatrix& mat
¶virtual void postOptimization()
virtual void postOptimization()
Declared at: llvm/lib/CodeGen/RegAllocBase.h:89
¶virtual unsigned int selectOrSplit(
llvm::LiveInterval& VirtReg,
SmallVectorImpl<unsigned int>& splitLVRs)
virtual unsigned int selectOrSplit(
llvm::LiveInterval& VirtReg,
SmallVectorImpl<unsigned int>& splitLVRs)
Declared at: llvm/lib/CodeGen/RegAllocBase.h:104
Parameters
- llvm::LiveInterval& VirtReg
- SmallVectorImpl<unsigned int>& splitLVRs
¶virtual llvm::Spiller& spiller()
virtual llvm::Spiller& spiller()
Declared at: llvm/lib/CodeGen/RegAllocBase.h:92
¶virtual ~RegAllocBase()
virtual ~RegAllocBase()
Declared at: llvm/lib/CodeGen/RegAllocBase.h:78