class RegAllocEvictionAdvisor
Declaration
class RegAllocEvictionAdvisor { /* full declaration omitted */ };
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:99
Member Variables
- protected const llvm::MachineFunction& MF
- protected const llvm::RAGreedy& RA
- protected llvm::LiveRegMatrix* const Matrix
- protected llvm::LiveIntervals* const LIS
- protected llvm::VirtRegMap* const VRM
- protected llvm::MachineRegisterInfo* const MRI
- protected const llvm::TargetRegisterInfo* const TRI
- protected const llvm::RegisterClassInfo& RegClassInfo
- protected const ArrayRef<uint8_t> RegCosts
- protected const bool EnableLocalReassign
- Run or not the local reassignment heuristic. This information is obtained from the TargetSubtargetInfo.
Method Overview
- public RegAllocEvictionAdvisor(const llvm::RegAllocEvictionAdvisor &)
- public RegAllocEvictionAdvisor(llvm::RegAllocEvictionAdvisor &&)
- protected RegAllocEvictionAdvisor(const llvm::MachineFunction & MF, const llvm::RAGreedy & RA)
- protected bool canAllocatePhysReg(unsigned int CostPerUseLimit, llvm::MCRegister PhysReg) const
- public virtual bool canEvictHintInterference(const llvm::LiveInterval & VirtReg, llvm::MCRegister PhysReg, const llvm::SmallVirtRegSet & FixedRegisters) const
- protected llvm::Register canReassign(const llvm::LiveInterval & VirtReg, llvm::Register PrevReg) const
- protected Optional<unsigned int> getOrderLimit(const llvm::LiveInterval & VirtReg, const llvm::AllocationOrder & Order, unsigned int CostPerUseLimit) const
- public bool isUnusedCalleeSavedReg(llvm::MCRegister PhysReg) const
- public virtual llvm::MCRegister tryFindEvictionCandidate(const llvm::LiveInterval & VirtReg, const llvm::AllocationOrder & Order, uint8_t CostPerUseLimit, const llvm::SmallVirtRegSet & FixedRegisters) const
- public virtual ~RegAllocEvictionAdvisor()
Methods
¶RegAllocEvictionAdvisor(
const llvm::RegAllocEvictionAdvisor&)
RegAllocEvictionAdvisor(
const llvm::RegAllocEvictionAdvisor&)
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:101
Parameters
¶RegAllocEvictionAdvisor(
llvm::RegAllocEvictionAdvisor&&)
RegAllocEvictionAdvisor(
llvm::RegAllocEvictionAdvisor&&)
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:102
Parameters
¶RegAllocEvictionAdvisor(
const llvm::MachineFunction& MF,
const llvm::RAGreedy& RA)
RegAllocEvictionAdvisor(
const llvm::MachineFunction& MF,
const llvm::RAGreedy& RA)
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:123
Parameters
- const llvm::MachineFunction& MF
- const llvm::RAGreedy& RA
¶bool canAllocatePhysReg(
unsigned int CostPerUseLimit,
llvm::MCRegister PhysReg) const
bool canAllocatePhysReg(
unsigned int CostPerUseLimit,
llvm::MCRegister PhysReg) const
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:136
Parameters
- unsigned int CostPerUseLimit
- llvm::MCRegister PhysReg
¶virtual bool canEvictHintInterference(
const llvm::LiveInterval& VirtReg,
llvm::MCRegister PhysReg,
const llvm::SmallVirtRegSet& FixedRegisters)
const
virtual bool canEvictHintInterference(
const llvm::LiveInterval& VirtReg,
llvm::MCRegister PhysReg,
const llvm::SmallVirtRegSet& FixedRegisters)
const
Description
Find out if we can evict the live ranges occupying the given PhysReg, which is a hint (preferred register) for VirtReg.
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:115
Parameters
- const llvm::LiveInterval& VirtReg
- llvm::MCRegister PhysReg
- const llvm::SmallVirtRegSet& FixedRegisters
¶llvm::Register canReassign(
const llvm::LiveInterval& VirtReg,
llvm::Register PrevReg) const
llvm::Register canReassign(
const llvm::LiveInterval& VirtReg,
llvm::Register PrevReg) const
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:125
Parameters
- const llvm::LiveInterval& VirtReg
- llvm::Register PrevReg
¶Optional<unsigned int> getOrderLimit(
const llvm::LiveInterval& VirtReg,
const llvm::AllocationOrder& Order,
unsigned int CostPerUseLimit) const
Optional<unsigned int> getOrderLimit(
const llvm::LiveInterval& VirtReg,
const llvm::AllocationOrder& Order,
unsigned int CostPerUseLimit) const
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:129
Parameters
- const llvm::LiveInterval& VirtReg
- const llvm::AllocationOrder& Order
- unsigned int CostPerUseLimit
¶bool isUnusedCalleeSavedReg(
llvm::MCRegister PhysReg) const
bool isUnusedCalleeSavedReg(
llvm::MCRegister PhysReg) const
Description
Returns true if the given \p PhysReg is a callee saved register and has not been used for allocation yet.
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:120
Parameters
- llvm::MCRegister PhysReg
¶virtual llvm::MCRegister tryFindEvictionCandidate(
const llvm::LiveInterval& VirtReg,
const llvm::AllocationOrder& Order,
uint8_t CostPerUseLimit,
const llvm::SmallVirtRegSet& FixedRegisters)
const
virtual llvm::MCRegister tryFindEvictionCandidate(
const llvm::LiveInterval& VirtReg,
const llvm::AllocationOrder& Order,
uint8_t CostPerUseLimit,
const llvm::SmallVirtRegSet& FixedRegisters)
const
Description
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.
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:108
Parameters
- const llvm::LiveInterval& VirtReg
- const llvm::AllocationOrder& Order
- uint8_t CostPerUseLimit
- const llvm::SmallVirtRegSet& FixedRegisters
¶virtual ~RegAllocEvictionAdvisor()
virtual ~RegAllocEvictionAdvisor()
Declared at: llvm/lib/CodeGen/RegAllocEvictionAdvisor.h:103