LLVM  16.0.0git
Public Member Functions | List of all members
llvm::ResourceManager Class Reference

#include "llvm/CodeGen/MachinePipeliner.h"

Public Member Functions

 ResourceManager (const TargetSubtargetInfo *ST, SwingSchedulerDAG *DAG)
 
void initProcResourceVectors (const MCSchedModel &SM, SmallVectorImpl< uint64_t > &Masks)
 
bool canReserveResources (SUnit &SU, int Cycle)
 Check if the resources occupied by a machine instruction are available in the current state. More...
 
void reserveResources (SUnit &SU, int Cycle)
 Reserve the resources occupied by a machine instruction and change the current state to reflect that change. More...
 
int calculateResMII () const
 
void init (int II)
 Initialize resources with the initiation interval II. More...
 

Detailed Description

Definition at line 444 of file MachinePipeliner.h.

Constructor & Destructor Documentation

◆ ResourceManager()

llvm::ResourceManager::ResourceManager ( const TargetSubtargetInfo ST,
SwingSchedulerDAG DAG 
)
inline

Definition at line 494 of file MachinePipeliner.h.

References initProcResourceVectors(), llvm::SwpForceIssueWidth, and TII.

Member Function Documentation

◆ calculateResMII()

int ResourceManager::calculateResMII ( ) const

◆ canReserveResources()

bool ResourceManager::canReserveResources ( SUnit SU,
int  Cycle 
)

Check if the resources occupied by a machine instruction are available in the current state.

Definition at line 3044 of file MachinePipeliner.cpp.

References llvm::dbgs(), llvm::MachineInstr::getDesc(), llvm::SUnit::getInstr(), llvm::ScheduleDAGInstrs::getSchedClass(), llvm::MachineInstr::isPseudo(), llvm::MCSchedClassDesc::isValid(), LLVM_DEBUG, and SwpDebugResource.

Referenced by llvm::SMSchedule::insert().

◆ init()

void ResourceManager::init ( int  II)

Initialize resources with the initiation interval II.

Definition at line 3274 of file MachinePipeliner.cpp.

References llvm::SmallVectorImpl< T >::clear(), llvm::MCSchedModel::getNumProcResourceKinds(), I, and llvm::SmallVectorImpl< T >::resize().

Referenced by llvm::SMSchedule::setInitiationInterval().

◆ initProcResourceVectors()

void ResourceManager::initProcResourceVectors ( const MCSchedModel SM,
SmallVectorImpl< uint64_t > &  Masks 
)

◆ reserveResources()

void ResourceManager::reserveResources ( SUnit SU,
int  Cycle 
)

Reserve the resources occupied by a machine instruction and change the current state to reflect that change.

Definition at line 3070 of file MachinePipeliner.cpp.

References llvm::dbgs(), llvm::MachineInstr::getDesc(), llvm::SUnit::getInstr(), llvm::ScheduleDAGInstrs::getSchedClass(), llvm::MachineInstr::isPseudo(), llvm::MCSchedClassDesc::isValid(), LLVM_DEBUG, and SwpDebugResource.


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