LLVM  14.0.0git
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::AllocationOrder Class Reference

#include "CodeGen/AllocationOrder.h"

Classes

class  Iterator
 Forward iterator for an AllocationOrder. More...
 

Public Member Functions

 AllocationOrder (SmallVector< MCPhysReg, 16 > &&Hints, ArrayRef< MCPhysReg > Order, bool HardHints)
 Create an AllocationOrder given the Hits, Order, and HardHits values. More...
 
Iterator begin () const
 
Iterator end () const
 
Iterator getOrderLimitEnd (unsigned OrderLimit) const
 
ArrayRef< MCPhysReggetOrder () const
 Get the allocation order without reordered hints. More...
 
bool isHint (Register Reg) const
 Return true if Reg is a preferred physical register. More...
 

Static Public Member Functions

static AllocationOrder create (unsigned VirtReg, const VirtRegMap &VRM, const RegisterClassInfo &RegClassInfo, const LiveRegMatrix *Matrix)
 Create a new AllocationOrder for VirtReg. More...
 

Detailed Description

Definition at line 30 of file AllocationOrder.h.

Constructor & Destructor Documentation

◆ AllocationOrder()

llvm::AllocationOrder::AllocationOrder ( SmallVector< MCPhysReg, 16 > &&  Hints,
ArrayRef< MCPhysReg Order,
bool  HardHints 
)
inline

Create an AllocationOrder given the Hits, Order, and HardHits values.

Use the create method above - the ctor is for unittests.

Definition at line 90 of file AllocationOrder.h.

Referenced by create().

Member Function Documentation

◆ begin()

Iterator llvm::AllocationOrder::begin ( ) const
inline

Definition at line 95 of file AllocationOrder.h.

◆ create()

AllocationOrder AllocationOrder::create ( unsigned  VirtReg,
const VirtRegMap VRM,
const RegisterClassInfo RegClassInfo,
const LiveRegMatrix Matrix 
)
static

Create a new AllocationOrder for VirtReg.

Parameters
VirtRegVirtual register to allocate for.
VRMVirtual register map for function.
RegClassInfoInformation about reserved and allocatable registers.

Definition at line 29 of file AllocationOrder.cpp.

References AllocationOrder(), assert(), E, llvm::VirtRegMap::getMachineFunction(), llvm::RegisterClassInfo::getOrder(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::VirtRegMap::getTargetRegInfo(), I, llvm::is_contained(), LLVM_DEBUG, Matrix, move, and TRI.

◆ end()

Iterator llvm::AllocationOrder::end ( ) const
inline

Definition at line 99 of file AllocationOrder.h.

◆ getOrder()

ArrayRef<MCPhysReg> llvm::AllocationOrder::getOrder ( ) const
inline

Get the allocation order without reordered hints.

Definition at line 111 of file AllocationOrder.h.

◆ getOrderLimitEnd()

Iterator llvm::AllocationOrder::getOrderLimitEnd ( unsigned  OrderLimit) const
inline

◆ isHint()

bool llvm::AllocationOrder::isHint ( Register  Reg) const
inline

Return true if Reg is a preferred physical register.

Definition at line 114 of file AllocationOrder.h.

References assert(), llvm::is_contained(), llvm::max(), and Reg.


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