36#ifndef LLVM_LIB_CODEGEN_REGALLOCBASE_H
37#define LLVM_LIB_CODEGEN_REGALLOCBASE_H
50class MachineRegisterInfo;
51template<
typename T>
class SmallVectorImpl;
53class TargetRegisterInfo;
63 virtual void anchor();
85 : shouldAllocateRegisterImpl(
F) {}
94 if (!shouldAllocateRegisterImpl)
96 return shouldAllocateRegisterImpl(*
TRI, *
MRI,
Reg);
This file defines the SmallPtrSet class.
LiveInterval - This class represents the liveness of a register, or stack slot.
Wrapper class representing physical registers. Should be passed by value.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
RegAllocBase provides the register allocation driver and interface that can be extended to add intere...
RegAllocBase(const RegAllocFilterFunc F=nullptr)
virtual void aboutToRemoveInterval(const LiveInterval &LI)
Method called when the allocator is about to remove a LiveInterval.
virtual MCRegister selectOrSplit(const LiveInterval &VirtReg, SmallVectorImpl< Register > &splitLVRs)=0
void enqueue(const LiveInterval *LI)
enqueue - Add VirtReg to the priority queue of unassigned registers.
virtual ~RegAllocBase()=default
void init(VirtRegMap &vrm, LiveIntervals &lis, LiveRegMatrix &mat)
SmallPtrSet< MachineInstr *, 32 > DeadRemats
Inst which is a def of an original reg and whose defs are already all dead after remat is saved in De...
virtual Spiller & spiller()=0
const TargetRegisterInfo * TRI
static const char TimerGroupName[]
static const char TimerGroupDescription[]
virtual const LiveInterval * dequeue()=0
dequeue - Return the next unassigned register, or NULL.
virtual void postOptimization()
RegisterClassInfo RegClassInfo
MachineRegisterInfo * MRI
virtual void enqueueImpl(const LiveInterval *LI)=0
enqueue - Add VirtReg to the priority queue of unassigned registers.
bool shouldAllocateRegister(Register Reg)
Get whether a given register should be allocated.
static bool VerifyEnabled
VerifyEnabled - True when -verify-regalloc is given.
Wrapper class representing virtual and physical registers.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This is an optimization pass for GlobalISel generic memory operations.
std::function< bool(const TargetRegisterInfo &TRI, const MachineRegisterInfo &MRI, const Register Reg)> RegAllocFilterFunc
Filter function for register classes during regalloc.