LLVM 24.0.0git
llvm::RAGreedy Class Reference

#include "CodeGen/RegAllocGreedy.h"

Inheritance diagram for llvm::RAGreedy:
[legend]

Classes

class  ExtraRegInfo
 Track allocation stage and eviction loop prevention during allocation. More...
struct  RequiredAnalyses

Public Member Functions

LiveRegMatrix * getInterferenceMatrix () const
LiveIntervals * getLiveIntervals () const
VirtRegMap * getVirtRegMap () const
const RegisterClassInfo & getRegClassInfo () const
const ExtraRegInfo & getExtraInfo () const
size_t getQueueSize () const
bool getRegClassPriorityTrumpsGlobalness () const
bool getReverseLocalAssignment () const
 RAGreedy (RequiredAnalyses &Analyses, const RegAllocFilterFunc F=nullptr)
Spiller & spiller () override
void enqueueImpl (const LiveInterval *LI) override
 enqueue - Add VirtReg to the priority queue of unassigned registers.
const LiveInterval * dequeue () override
 dequeue - Return the next unassigned register, or NULL.
MCRegister selectOrSplit (const LiveInterval &, SmallVectorImpl< Register > &) override
void aboutToRemoveInterval (const LiveInterval &) override
 Method called when the allocator is about to remove a LiveInterval.
bool run (MachineFunction &mf)
 Perform register allocation.
void releaseMemory ()

Additional Inherited Members

Static Public Attributes inherited from llvm::RegAllocBase
static bool VerifyEnabled = false
 VerifyEnabled - True when -verify-regalloc is given.
Protected Member Functions inherited from llvm::RegAllocBase
 RegAllocBase (const RegAllocFilterFunc F=nullptr)
virtual ~RegAllocBase ()=default
void init (VirtRegMap &vrm, LiveIntervals &lis, LiveRegMatrix &mat)
bool shouldAllocateRegister (Register Reg)
 Get whether a given register should be allocated.
void allocatePhysRegs ()
virtual void postOptimization ()
void cleanupFailedVReg (Register FailedVReg, MCRegister PhysReg, SmallVectorImpl< Register > &SplitRegs)
 Perform cleanups on registers that failed to allocate.
void enqueue (const LiveInterval *LI)
 enqueue - Add VirtReg to the priority queue of unassigned registers.
MCPhysReg getErrorAssignment (const TargetRegisterClass &RC, const MachineInstr *CtxMI=nullptr)
 Query a physical register to use as a filler in contexts where the allocation has failed.
Protected Attributes inherited from llvm::RegAllocBase
const TargetRegisterInfo * TRI = nullptr
MachineRegisterInfo * MRI = nullptr
VirtRegMap * VRM = nullptr
LiveIntervals * LIS = nullptr
LiveRegMatrix * Matrix = nullptr
RegisterClassInfo RegClassInfo
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 DeadRemats.
SmallSet< Register, 2 > FailedVRegs
Static Protected Attributes inherited from llvm::RegAllocBase
static const char TimerGroupName [] = "regalloc"
static const char TimerGroupDescription [] = "Register Allocation"

Detailed Description

Definition at line 59 of file RegAllocGreedy.h.

Constructor & Destructor Documentation

◆ RAGreedy()

Member Function Documentation

◆ aboutToRemoveInterval()

void RAGreedy::aboutToRemoveInterval ( const LiveInterval & LI)
overridevirtual

Method called when the allocator is about to remove a LiveInterval.

Reimplemented from llvm::RegAllocBase.

Definition at line 2421 of file RegAllocGreedy.cpp.

◆ dequeue()

const LiveInterval * RAGreedy::dequeue ( )
overridevirtual

dequeue - Return the next unassigned register, or NULL.

Implements llvm::RegAllocBase.

Definition at line 517 of file RegAllocGreedy.cpp.

References dequeue().

Referenced by dequeue().

◆ enqueueImpl()

void RAGreedy::enqueueImpl ( const LiveInterval * LI)
overridevirtual

enqueue - Add VirtReg to the priority queue of unassigned registers.

Implements llvm::RegAllocBase.

Definition at line 418 of file RegAllocGreedy.cpp.

◆ getExtraInfo()

const ExtraRegInfo & llvm::RAGreedy::getExtraInfo ( ) const
inline

Definition at line 146 of file RegAllocGreedy.h.

◆ getInterferenceMatrix()

LiveRegMatrix * llvm::RAGreedy::getInterferenceMatrix ( ) const
inline

Definition at line 142 of file RegAllocGreedy.h.

References llvm::RegAllocBase::Matrix.

◆ getLiveIntervals()

LiveIntervals * llvm::RAGreedy::getLiveIntervals ( ) const
inline

Definition at line 143 of file RegAllocGreedy.h.

References llvm::RegAllocBase::LIS.

◆ getQueueSize()

size_t llvm::RAGreedy::getQueueSize ( ) const
inline

Definition at line 147 of file RegAllocGreedy.h.

◆ getRegClassInfo()

const RegisterClassInfo & llvm::RAGreedy::getRegClassInfo ( ) const
inline

Definition at line 145 of file RegAllocGreedy.h.

References llvm::RegAllocBase::RegClassInfo.

◆ getRegClassPriorityTrumpsGlobalness()

bool llvm::RAGreedy::getRegClassPriorityTrumpsGlobalness ( ) const
inline

Definition at line 151 of file RegAllocGreedy.h.

◆ getReverseLocalAssignment()

bool llvm::RAGreedy::getReverseLocalAssignment ( ) const
inline

Definition at line 154 of file RegAllocGreedy.h.

◆ getVirtRegMap()

VirtRegMap * llvm::RAGreedy::getVirtRegMap ( ) const
inline

Definition at line 144 of file RegAllocGreedy.h.

References llvm::RegAllocBase::VRM.

◆ releaseMemory()

void RAGreedy::releaseMemory ( )

Definition at line 413 of file RegAllocGreedy.cpp.

Referenced by run().

◆ run()

◆ selectOrSplit()

MCRegister RAGreedy::selectOrSplit ( const LiveInterval & VirtReg,
SmallVectorImpl< Register > & NewVRegs )
overridevirtual

Implements llvm::RegAllocBase.

Definition at line 2331 of file RegAllocGreedy.cpp.

◆ spiller()

Spiller & llvm::RAGreedy::spiller ( )
inlineoverridevirtual

Implements llvm::RegAllocBase.

Definition at line 291 of file RegAllocGreedy.h.


The documentation for this class was generated from the following files: