LLVM 22.0.0git
|
#include "CodeGen/RegAllocGreedy.h"
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" |
Definition at line 60 of file RegAllocGreedy.h.
RAGreedy::RAGreedy | ( | RequiredAnalyses & | Analyses, |
const RegAllocFilterFunc | F = nullptr ) |
Definition at line 200 of file RegAllocGreedy.cpp.
References llvm::RAGreedy::RequiredAnalyses::Bundles, llvm::RAGreedy::RequiredAnalyses::DebugVars, llvm::RAGreedy::RequiredAnalyses::DomTree, llvm::RAGreedy::RequiredAnalyses::EvictProvider, F, llvm::RAGreedy::RequiredAnalyses::Indexes, llvm::RAGreedy::RequiredAnalyses::LIS, llvm::RegAllocBase::LIS, llvm::RAGreedy::RequiredAnalyses::Loops, llvm::RAGreedy::RequiredAnalyses::LRM, llvm::RAGreedy::RequiredAnalyses::LSS, llvm::RegAllocBase::Matrix, llvm::RAGreedy::RequiredAnalyses::MBFI, llvm::RAGreedy::RequiredAnalyses::ORE, llvm::RAGreedy::RequiredAnalyses::PriorityProvider, llvm::RegAllocBase::RegAllocBase(), llvm::RAGreedy::RequiredAnalyses::SpillPlacer, llvm::RAGreedy::RequiredAnalyses::VRM, and llvm::RegAllocBase::VRM.
|
overridevirtual |
Method called when the allocator is about to remove a LiveInterval.
Reimplemented from llvm::RegAllocBase.
Definition at line 2353 of file RegAllocGreedy.cpp.
|
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().
|
overridevirtual |
enqueue - Add VirtReg to the priority queue of unassigned registers.
Implements llvm::RegAllocBase.
Definition at line 417 of file RegAllocGreedy.cpp.
|
inline |
Definition at line 147 of file RegAllocGreedy.h.
|
inline |
Definition at line 143 of file RegAllocGreedy.h.
References llvm::RegAllocBase::Matrix.
|
inline |
Definition at line 144 of file RegAllocGreedy.h.
References llvm::RegAllocBase::LIS.
|
inline |
Definition at line 148 of file RegAllocGreedy.h.
|
inline |
Definition at line 146 of file RegAllocGreedy.h.
References llvm::RegAllocBase::RegClassInfo.
|
inline |
Definition at line 152 of file RegAllocGreedy.h.
|
inline |
Definition at line 155 of file RegAllocGreedy.h.
|
inline |
Definition at line 145 of file RegAllocGreedy.h.
References llvm::RegAllocBase::VRM.
void RAGreedy::releaseMemory | ( | ) |
Definition at line 412 of file RegAllocGreedy.cpp.
Referenced by run().
bool RAGreedy::run | ( | MachineFunction & | mf | ) |
Perform register allocation.
Definition at line 2842 of file RegAllocGreedy.cpp.
References llvm::RegAllocBase::allocatePhysRegs(), llvm::createInlineSpiller(), llvm::dbgs(), llvm::errs(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFunction::getName(), llvm::MachineFunction::getSubtarget(), GreedyRegClassPriorityTrumpsGlobalness, GreedyReverseLocalAssignment, llvm::RegAllocBase::init(), llvm::RegAllocBase::LIS, LLVM_DEBUG, llvm::RegAllocBase::Matrix, llvm::RegAllocBase::postOptimization(), releaseMemory(), llvm::RegAllocBase::TRI, llvm::RegAllocBase::VerifyEnabled, and llvm::RegAllocBase::VRM.
|
overridevirtual |
Implements llvm::RegAllocBase.
Definition at line 2287 of file RegAllocGreedy.cpp.
|
inlineoverridevirtual |
Implements llvm::RegAllocBase.
Definition at line 292 of file RegAllocGreedy.h.