LLVM
15.0.0git
|
#include "CodeGen/RegAllocEvictionAdvisor.h"
Public Member Functions | |
RegAllocEvictionAdvisor (const RegAllocEvictionAdvisor &)=delete | |
RegAllocEvictionAdvisor (RegAllocEvictionAdvisor &&)=delete | |
virtual | ~RegAllocEvictionAdvisor ()=default |
virtual MCRegister | tryFindEvictionCandidate (const LiveInterval &VirtReg, const AllocationOrder &Order, uint8_t CostPerUseLimit, const SmallVirtRegSet &FixedRegisters) const =0 |
Find a physical register that can be freed by evicting the FixedRegisters, or return NoRegister. More... | |
virtual bool | canEvictHintInterference (const LiveInterval &VirtReg, MCRegister PhysReg, const SmallVirtRegSet &FixedRegisters) const =0 |
Find out if we can evict the live ranges occupying the given PhysReg, which is a hint (preferred register) for VirtReg. More... | |
bool | isUnusedCalleeSavedReg (MCRegister PhysReg) const |
Returns true if the given PhysReg is a callee saved register and has not been used for allocation yet. More... | |
Protected Member Functions | |
RegAllocEvictionAdvisor (const MachineFunction &MF, const RAGreedy &RA) | |
Register | canReassign (const LiveInterval &VirtReg, Register PrevReg) const |
Optional< unsigned > | getOrderLimit (const LiveInterval &VirtReg, const AllocationOrder &Order, unsigned CostPerUseLimit) const |
bool | canAllocatePhysReg (unsigned CostPerUseLimit, MCRegister PhysReg) const |
Protected Attributes | |
const MachineFunction & | MF |
const RAGreedy & | RA |
LiveRegMatrix *const | Matrix |
LiveIntervals *const | LIS |
VirtRegMap *const | VRM |
MachineRegisterInfo *const | MRI |
const TargetRegisterInfo *const | TRI |
const RegisterClassInfo & | RegClassInfo |
const ArrayRef< uint8_t > | RegCosts |
const bool | EnableLocalReassign |
Run or not the local reassignment heuristic. More... | |
Definition at line 99 of file RegAllocEvictionAdvisor.h.
|
delete |
|
delete |
|
virtualdefault |
|
protected |
Definition at line 125 of file RegAllocEvictionAdvisor.cpp.
|
protected |
Definition at line 529 of file RegAllocGreedy.cpp.
References llvm::dbgs(), llvm::RegisterClassInfo::getLastCalleeSavedAlias(), LLVM_DEBUG, llvm::printReg(), llvm::RegAllocBase::RegClassInfo, and llvm::RegAllocBase::TRI.
|
pure virtual |
Find out if we can evict the live ranges occupying the given PhysReg, which is a hint (preferred register) for VirtReg.
|
protected |
Definition at line 423 of file RegAllocGreedy.cpp.
References llvm::AllocationOrder::begin(), llvm::LiveIntervalUnion::Query::checkInterference(), llvm::AllocationOrder::create(), llvm::dbgs(), E, llvm::AllocationOrder::end(), llvm::LiveRegMatrix::getLiveUnions(), I, llvm::Register::id(), llvm::MCRegisterInfo::DiffListIterator::isValid(), LLVM_DEBUG, llvm::RegAllocBase::Matrix, llvm::printReg(), llvm::LiveInterval::reg(), llvm::RegAllocBase::RegClassInfo, llvm::RegAllocBase::TRI, and llvm::RegAllocBase::VRM.
|
protected |
Definition at line 503 of file RegAllocGreedy.cpp.
References llvm::dbgs(), llvm::RegisterClassInfo::getLastCostChange(), llvm::RegisterClassInfo::getMinCost(), llvm::AllocationOrder::getOrder(), llvm::MachineRegisterInfo::getRegClass(), llvm::TargetRegisterInfo::getRegClassName(), LLVM_DEBUG, llvm::RegAllocBase::MRI, llvm::None, llvm::LiveInterval::reg(), llvm::RegAllocBase::RegClassInfo, and llvm::RegAllocBase::TRI.
bool RegAllocEvictionAdvisor::isUnusedCalleeSavedReg | ( | MCRegister | PhysReg | ) | const |
Returns true if the given PhysReg
is a callee saved register and has not been used for allocation yet.
Definition at line 494 of file RegAllocGreedy.cpp.
References llvm::RegisterClassInfo::getLastCalleeSavedAlias(), llvm::LiveRegMatrix::isPhysRegUsed(), llvm::RegAllocBase::Matrix, and llvm::RegAllocBase::RegClassInfo.
|
pure virtual |
Find a physical register that can be freed by evicting the FixedRegisters, or return NoRegister.
The eviction decision is assumed to be correct (i.e. no fixed live ranges are evicted) and profitable.
|
protected |
Run or not the local reassignment heuristic.
This information is obtained from the TargetSubtargetInfo.
Definition at line 150 of file RegAllocEvictionAdvisor.h.
|
protected |
Definition at line 141 of file RegAllocEvictionAdvisor.h.
|
protected |
Definition at line 140 of file RegAllocEvictionAdvisor.h.
|
protected |
Definition at line 138 of file RegAllocEvictionAdvisor.h.
|
protected |
Definition at line 143 of file RegAllocEvictionAdvisor.h.
Definition at line 139 of file RegAllocEvictionAdvisor.h.
|
protected |
Definition at line 145 of file RegAllocEvictionAdvisor.h.
Definition at line 146 of file RegAllocEvictionAdvisor.h.
|
protected |
Definition at line 144 of file RegAllocEvictionAdvisor.h.
|
protected |
Definition at line 142 of file RegAllocEvictionAdvisor.h.