LLVM: llvm::RegAllocEvictionAdvisor Class Reference (original) (raw)
#include "[llvm/CodeGen/RegAllocEvictionAdvisor.h](RegAllocEvictionAdvisor%5F8h%5Fsource.html)"
| 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. | |
| 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. | |
| bool | isUnusedCalleeSavedReg (MCRegister PhysReg) const |
| Returns true if the given PhysReg is a callee saved register and has not been used for allocation yet. |
| 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. |
Definition at line 101 of file RegAllocEvictionAdvisor.h.
◆ RegAllocEvictionAdvisor() [2/3]
◆ ~RegAllocEvictionAdvisor()
| virtual llvm::RegAllocEvictionAdvisor::~RegAllocEvictionAdvisor ( ) | virtualdefault |
|---|
◆ RegAllocEvictionAdvisor() [3/3]
Definition at line 181 of file RegAllocEvictionAdvisor.cpp.
References EnableLocalReassign, EnableLocalReassignment, LIS, Matrix, MF, MRI, RA, RegClassInfo, RegCosts, TRI, and VRM.
◆ canAllocatePhysReg()
◆ canEvictHintInterference()
Find out if we can evict the live ranges occupying the given PhysReg, which is a hint (preferred register) for VirtReg.
Referenced by INITIALIZE_PASS().
◆ canReassign()
Definition at line 589 of file RegAllocGreedy.cpp.
References llvm::LiveIntervalUnion::Query::checkInterference(), llvm::AllocationOrder::create(), llvm::dbgs(), LLVM_DEBUG, Matrix, llvm::none_of(), llvm::printReg(), llvm::LiveInterval::reg(), RegClassInfo, TRI, and VRM.
◆ getOrderLimit()
◆ isUnusedCalleeSavedReg()
| bool RegAllocEvictionAdvisor::isUnusedCalleeSavedReg | ( | MCRegister | PhysReg | ) | const |
|---|
◆ tryFindEvictionCandidate()
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.
Referenced by INITIALIZE_PASS().
◆ EnableLocalReassign
| const bool llvm::RegAllocEvictionAdvisor::EnableLocalReassign | protected |
|---|
◆ LIS
◆ Matrix
◆ MF
◆ MRI
◆ RA
◆ RegClassInfo
◆ RegCosts
◆ TRI
◆ VRM
The documentation for this class was generated from the following files:
- include/llvm/CodeGen/RegAllocEvictionAdvisor.h
- lib/CodeGen/RegAllocEvictionAdvisor.cpp
- lib/CodeGen/RegAllocGreedy.cpp