LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::mca::ResourceManager Class Reference

A resource manager for processor resource units and groups. More...

#include "llvm/MCA/HardwareUnits/ResourceManager.h"

Public Member Functions

 ResourceManager (const MCSchedModel &SM)
 
virtual ~ResourceManager ()=default
 
void setCustomStrategy (std::unique_ptr< ResourceStrategy > S, unsigned ResourceID)
 
ResourceStateEvent canBeDispatched (uint64_t ConsumedBuffers) const
 
unsigned resolveResourceMask (uint64_t Mask) const
 
void reserveBuffers (uint64_t ConsumedBuffers)
 
void releaseBuffers (uint64_t ConsumedBuffers)
 
void reserveResource (uint64_t ResourceID)
 
void releaseResource (uint64_t ResourceID)
 
uint64_t checkAvailability (const InstrDesc &Desc) const
 
uint64_t getProcResUnitMask () const
 
uint64_t getAvailableProcResUnits () const
 
void issueInstruction (const InstrDesc &Desc, SmallVectorImpl< std::pair< ResourceRef, ResourceCycles >> &Pipes)
 
void cycleEvent (SmallVectorImpl< ResourceRef > &ResourcesFreed)
 
void dump () const
 

Detailed Description

A resource manager for processor resource units and groups.

This class owns all the ResourceState objects, and it is responsible for acting on requests from a Scheduler by updating the internal state of ResourceState objects. This class doesn't know about instruction itineraries and functional units. In future, it can be extended to support itineraries too through the same public interface.

Definition at line 312 of file ResourceManager.h.

Constructor & Destructor Documentation

◆ ResourceManager()

llvm::mca::ResourceManager::ResourceManager ( const MCSchedModel SM)

◆ ~ResourceManager()

virtual llvm::mca::ResourceManager::~ResourceManager ( )
virtualdefault

Member Function Documentation

◆ canBeDispatched()

ResourceStateEvent llvm::mca::ResourceManager::canBeDispatched ( uint64_t  ConsumedBuffers) const

◆ checkAvailability()

uint64_t llvm::mca::ResourceManager::checkAvailability ( const InstrDesc Desc) const

◆ cycleEvent()

void llvm::mca::ResourceManager::cycleEvent ( SmallVectorImpl< ResourceRef > &  ResourcesFreed)

◆ dump()

void llvm::mca::ResourceManager::dump ( ) const
inline

Definition at line 439 of file ResourceManager.h.

◆ getAvailableProcResUnits()

uint64_t llvm::mca::ResourceManager::getAvailableProcResUnits ( ) const
inline

Definition at line 430 of file ResourceManager.h.

◆ getProcResUnitMask()

uint64_t llvm::mca::ResourceManager::getProcResUnitMask ( ) const
inline

Definition at line 429 of file ResourceManager.h.

◆ issueInstruction()

void llvm::mca::ResourceManager::issueInstruction ( const InstrDesc Desc,
SmallVectorImpl< std::pair< ResourceRef, ResourceCycles >> &  Pipes 
)

◆ releaseBuffers()

void llvm::mca::ResourceManager::releaseBuffers ( uint64_t  ConsumedBuffers)

Definition at line 270 of file ResourceManager.cpp.

References llvm::mca::getResourceStateIndex().

◆ releaseResource()

void llvm::mca::ResourceManager::releaseResource ( uint64_t  ResourceID)

◆ reserveBuffers()

void llvm::mca::ResourceManager::reserveBuffers ( uint64_t  ConsumedBuffers)

◆ reserveResource()

void llvm::mca::ResourceManager::reserveResource ( uint64_t  ResourceID)

◆ resolveResourceMask()

unsigned llvm::mca::ResourceManager::resolveResourceMask ( uint64_t  Mask) const

◆ setCustomStrategy()

void llvm::mca::ResourceManager::setCustomStrategy ( std::unique_ptr< ResourceStrategy S,
unsigned  ResourceID 
)
inline

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