LLVM 22.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

LiveRegMatrixgetInterferenceMatrix () const
LiveIntervalsgetLiveIntervals () const
VirtRegMapgetVirtRegMap () const
const RegisterClassInfogetRegClassInfo () const
const ExtraRegInfogetExtraInfo () const
size_t getQueueSize () const
bool getRegClassPriorityTrumpsGlobalness () const
bool getReverseLocalAssignment () const
 RAGreedy (RequiredAnalyses &Analyses, const RegAllocFilterFunc F=nullptr)
Spillerspiller () override
void enqueueImpl (const LiveInterval *LI) override
 enqueue - Add VirtReg to the priority queue of unassigned registers.
const LiveIntervaldequeue () 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 TargetRegisterInfoTRI = nullptr
MachineRegisterInfoMRI = nullptr
VirtRegMapVRM = nullptr
LiveIntervalsLIS = nullptr
LiveRegMatrixMatrix = 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 60 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 2353 of file RegAllocGreedy.cpp.

◆ dequeue()

const LiveInterval * RAGreedy::dequeue ( )
overridevirtual

dequeue - Return the next unassigned register, or NULL.

Implements llvm::RegAllocBase.

Definition at line 516 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 417 of file RegAllocGreedy.cpp.

◆ getExtraInfo()

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

Definition at line 147 of file RegAllocGreedy.h.

◆ getInterferenceMatrix()

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

Definition at line 143 of file RegAllocGreedy.h.

References llvm::RegAllocBase::Matrix.

◆ getLiveIntervals()

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

Definition at line 144 of file RegAllocGreedy.h.

References llvm::RegAllocBase::LIS.

◆ getQueueSize()

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

Definition at line 148 of file RegAllocGreedy.h.

◆ getRegClassInfo()

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

Definition at line 146 of file RegAllocGreedy.h.

References llvm::RegAllocBase::RegClassInfo.

◆ getRegClassPriorityTrumpsGlobalness()

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

Definition at line 152 of file RegAllocGreedy.h.

◆ getReverseLocalAssignment()

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

Definition at line 155 of file RegAllocGreedy.h.

◆ getVirtRegMap()

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

Definition at line 145 of file RegAllocGreedy.h.

References llvm::RegAllocBase::VRM.

◆ releaseMemory()

void RAGreedy::releaseMemory ( )

Definition at line 412 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 2287 of file RegAllocGreedy.cpp.

◆ spiller()

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

Implements llvm::RegAllocBase.

Definition at line 292 of file RegAllocGreedy.h.


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