LLVM 22.0.0git
Public Types | 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 Types

using ResourceWithCycles = std::pair< ResourceRef, ReleaseAtCycles >
 

Public Member Functions

LLVM_ABI ResourceManager (const MCSchedModel &SM)
 
virtual ~ResourceManager ()=default
 
void setCustomStrategy (std::unique_ptr< ResourceStrategy > S, unsigned ResourceID)
 
LLVM_ABI ResourceStateEvent canBeDispatched (uint64_t ConsumedBuffers) const
 
LLVM_ABI unsigned resolveResourceMask (uint64_t Mask) const
 
LLVM_ABI void reserveBuffers (uint64_t ConsumedBuffers)
 
LLVM_ABI void releaseBuffers (uint64_t ConsumedBuffers)
 
LLVM_ABI void reserveResource (uint64_t ResourceID)
 
LLVM_ABI void releaseResource (uint64_t ResourceID)
 
LLVM_ABI uint64_t checkAvailability (const InstrDesc &Desc) const
 
uint64_t getProcResUnitMask () const
 
uint64_t getAvailableProcResUnits () const
 
void issueInstruction (const InstrDesc &Desc, SmallVectorImpl< ResourceWithCycles > &Pipes)
 
LLVM_ABI void fastIssueInstruction (const InstrDesc &Desc, SmallVectorImpl< ResourceWithCycles > &Pipes)
 
LLVM_ABI void issueInstructionImpl (const InstrDesc &Desc, SmallVectorImpl< ResourceWithCycles > &Pipes)
 
LLVM_ABI 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 315 of file ResourceManager.h.

Member Typedef Documentation

◆ ResourceWithCycles

Definition at line 435 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 467 of file ResourceManager.h.

◆ fastIssueInstruction()

void llvm::mca::ResourceManager::fastIssueInstruction ( const InstrDesc Desc,
SmallVectorImpl< ResourceWithCycles > &  Pipes 
)

◆ getAvailableProcResUnits()

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

Definition at line 433 of file ResourceManager.h.

◆ getProcResUnitMask()

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

Definition at line 432 of file ResourceManager.h.

◆ issueInstruction()

void llvm::mca::ResourceManager::issueInstruction ( const InstrDesc Desc,
SmallVectorImpl< ResourceWithCycles > &  Pipes 
)
inline

Definition at line 437 of file ResourceManager.h.

References fastIssueInstruction(), and issueInstructionImpl().

◆ issueInstructionImpl()

void llvm::mca::ResourceManager::issueInstructionImpl ( const InstrDesc Desc,
SmallVectorImpl< ResourceWithCycles > &  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

Definition at line 166 of file ResourceManager.cpp.

References llvm::mca::getResourceStateIndex().

◆ setCustomStrategy()

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

Definition at line 395 of file ResourceManager.h.

References assert(), and llvm::SmallVectorBase< Size_T >::size().


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