LLVM
8.0.1
|
A processor resource descriptor. More...
#include "llvm/MCA/HardwareUnits/ResourceManager.h"
Public Member Functions | |
ResourceState (const MCProcResourceDesc &Desc, unsigned Index, uint64_t Mask) | |
unsigned | getProcResourceID () const |
uint64_t | getResourceMask () const |
uint64_t | getReadyMask () const |
int | getBufferSize () const |
bool | isBuffered () const |
bool | isInOrder () const |
bool | isADispatchHazard () const |
Returns true if this is an in-order dispatch/issue resource. More... | |
bool | isReserved () const |
void | setReserved () |
void | clearReserved () |
bool | isReady (unsigned NumUnits=1) const |
Returs true if this resource is not reserved, and if there are at least NumUnits available units. More... | |
bool | isAResourceGroup () const |
bool | containsResource (uint64_t ID) const |
void | markSubResourceAsUsed (uint64_t ID) |
void | releaseSubResource (uint64_t ID) |
unsigned | getNumUnits () const |
ResourceStateEvent | isBufferAvailable () const |
Checks if there is an available slot in the resource buffer. More... | |
void | reserveBuffer () |
Reserve a slot in the buffer. More... | |
void | releaseBuffer () |
Release a slot in the buffer. More... | |
void | dump () const |
A processor resource descriptor.
There is an instance of this class for every processor resource defined by the machine scheduling model. Objects of class ResourceState dynamically track the usage of processor resource units.
Definition at line 138 of file ResourceManager.h.
llvm::mca::ResourceState::ResourceState | ( | const MCProcResourceDesc & | Desc, |
unsigned | Index, | ||
uint64_t | Mask | ||
) |
Definition at line 72 of file ResourceManager.cpp.
References llvm::mca::getResourceStateIndex(), and llvm::MCProcResourceDesc::NumUnits.
|
inline |
Definition at line 232 of file ResourceManager.h.
Referenced by llvm::mca::ResourceManager::releaseResource().
|
inline |
Definition at line 240 of file ResourceManager.h.
Referenced by llvm::mca::ResourceManager::resolveResourceMask().
void llvm::mca::ResourceState::dump | ( | ) | const |
Definition at line 101 of file ResourceManager.cpp.
References llvm::dbgs(), and llvm::format_hex().
|
inline |
Definition at line 222 of file ResourceManager.h.
|
inline |
Definition at line 252 of file ResourceManager.h.
References llvm::countPopulation().
Referenced by llvm::mca::getStrategyFor(), and llvm::mca::ResourceManager::resolveResourceMask().
|
inline |
Definition at line 219 of file ResourceManager.h.
|
inline |
Definition at line 221 of file ResourceManager.h.
Referenced by llvm::mca::getStrategyFor().
|
inline |
Definition at line 220 of file ResourceManager.h.
Referenced by llvm::mca::ResourceManager::resolveResourceMask().
|
inline |
Returns true if this is an in-order dispatch/issue resource.
Definition at line 228 of file ResourceManager.h.
Referenced by isBufferAvailable(), isReady(), and llvm::mca::ResourceManager::reserveBuffers().
|
inline |
Definition at line 238 of file ResourceManager.h.
Referenced by llvm::mca::getStrategyFor(), llvm::mca::ResourceManager::resolveResourceMask(), and llvm::mca::ResourceManager::ResourceManager().
ResourceStateEvent llvm::mca::ResourceState::isBufferAvailable | ( | ) | const |
Checks if there is an available slot in the resource buffer.
Returns RS_BUFFER_AVAILABLE if this is not a buffered resource, or if there is a slot available.
Returns RS_RESERVED if this buffered resource is a dispatch hazard, and it is reserved.
Returns RS_BUFFER_UNAVAILABLE if there are no available slots.
Definition at line 92 of file ResourceManager.cpp.
References isADispatchHazard(), isBuffered(), isReserved(), llvm::mca::RS_BUFFER_AVAILABLE, llvm::mca::RS_BUFFER_UNAVAILABLE, and llvm::mca::RS_RESERVED.
Referenced by llvm::mca::ResourceManager::canBeDispatched(), and llvm::mca::ResourceManager::reserveBuffers().
|
inline |
Definition at line 224 of file ResourceManager.h.
Referenced by isBufferAvailable().
|
inline |
Definition at line 225 of file ResourceManager.h.
Returs true if this resource is not reserved, and if there are at least NumUnits
available units.
Definition at line 87 of file ResourceManager.cpp.
References llvm::countPopulation(), isADispatchHazard(), and isReserved().
Referenced by llvm::mca::ResourceManager::resolveResourceMask().
|
inline |
Definition at line 229 of file ResourceManager.h.
Referenced by isBufferAvailable(), isReady(), llvm::mca::ResourceManager::reserveBuffers(), and llvm::mca::ResourceManager::reserveResource().
|
inline |
Definition at line 242 of file ResourceManager.h.
References assert().
Referenced by llvm::mca::ResourceManager::resolveResourceMask().
|
inline |
Release a slot in the buffer.
Definition at line 274 of file ResourceManager.h.
References assert(), and llvm::dump().
|
inline |
Definition at line 247 of file ResourceManager.h.
References assert().
Referenced by llvm::mca::ResourceManager::resolveResourceMask().
|
inline |
Reserve a slot in the buffer.
Definition at line 268 of file ResourceManager.h.
Referenced by llvm::mca::ResourceManager::reserveBuffers().
|
inline |
Definition at line 231 of file ResourceManager.h.
Referenced by llvm::mca::ResourceManager::reserveBuffers(), and llvm::mca::ResourceManager::reserveResource().