LLVM  8.0.1
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 (ArrayRef< uint64_t > Buffers) const
 
unsigned resolveResourceMask (uint64_t Mask) const
 
void reserveBuffers (ArrayRef< uint64_t > Buffers)
 
void releaseBuffers (ArrayRef< uint64_t > Buffers)
 
void reserveResource (uint64_t ResourceID)
 
void releaseResource (uint64_t ResourceID)
 
bool canBeIssued (const InstrDesc &Desc) 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 304 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 ( ArrayRef< uint64_t >  Buffers) const

◆ canBeIssued()

bool llvm::mca::ResourceManager::canBeIssued ( const InstrDesc Desc) const

Definition at line 263 of file ResourceManager.cpp.

References llvm::all_of(), E, and llvm::mca::InstrDesc::Resources.

◆ cycleEvent()

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

◆ dump()

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

Definition at line 401 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 ( ArrayRef< uint64_t >  Buffers)

Definition at line 258 of file ResourceManager.cpp.

References llvm::mca::getResourceStateIndex().

◆ releaseResource()

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

◆ reserveBuffers()

void llvm::mca::ResourceManager::reserveBuffers ( ArrayRef< uint64_t >  Buffers)

◆ 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: