LLVM 24.0.0git
llvm::AllocationOrder Class Reference

#include "CodeGen/AllocationOrder.h"

Classes

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

Public Member Functions

 AllocationOrder (SmallVector< MCPhysReg, 16 > &&HintsAndCustomOrder, int NumHints, ArrayRef< MCPhysReg > Order, bool HardHints)
 Create an AllocationOrder from HintsAndCustomOrder that contains NumHints Hints optionally followed by a custom order.
 AllocationOrder (SmallVector< MCPhysReg, 16 > &&Hints, ArrayRef< MCPhysReg > Order, bool HardHints)
 Create an AllocationOrder given the Hints, Order, and HardHints values.
Iterator begin () const
Iterator end () const
Iterator getOrderLimitEnd (unsigned OrderLimit) const
ArrayRef< MCPhysReg > getOrder () const
 Get the allocation order without reordered hints.
bool hasCustomOrder () const
 Return true if a custom order replaced the RegisterClassInfo order.
bool isHint (Register Reg) const
 Return true if Reg is a preferred physical register.

Static Public Member Functions

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

Detailed Description

Definition at line 31 of file AllocationOrder.h.

Constructor & Destructor Documentation

◆ AllocationOrder() [1/2]

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

Create an AllocationOrder from HintsAndCustomOrder that contains NumHints Hints optionally followed by a custom order.

When that custom order is present it becomes the allocation order otherwise Order is used as-is.

Definition at line 100 of file AllocationOrder.h.

References llvm::move(), and llvm::size().

Referenced by AllocationOrder(), create(), and llvm::AllocationOrder::Iterator::Iterator().

◆ AllocationOrder() [2/2]

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

Create an AllocationOrder given the Hints, Order, and HardHints values.

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

Definition at line 111 of file AllocationOrder.h.

References AllocationOrder(), llvm::move(), and llvm::size().

Member Function Documentation

◆ begin()

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

Definition at line 116 of file AllocationOrder.h.

◆ create()

◆ end()

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

Definition at line 118 of file AllocationOrder.h.

Referenced by getOrderLimitEnd().

◆ getOrder()

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

Get the allocation order without reordered hints.

Definition at line 130 of file AllocationOrder.h.

Referenced by llvm::RegAllocEvictionAdvisor::getOrderLimit().

◆ getOrderLimitEnd()

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

Definition at line 120 of file AllocationOrder.h.

References assert(), and end().

◆ hasCustomOrder()

bool llvm::AllocationOrder::hasCustomOrder ( ) const
inline

Return true if a custom order replaced the RegisterClassInfo order.

Definition at line 133 of file AllocationOrder.h.

Referenced by llvm::RegAllocEvictionAdvisor::getOrderLimit().

◆ isHint()

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

Return true if Reg is a preferred physical register.

Definition at line 138 of file AllocationOrder.h.

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


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