class ResourceState
Declaration
class ResourceState { /* full declaration omitted */ };
Description
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.
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:136
Method Overview
- public ResourceState(const llvm::MCProcResourceDesc & Desc, unsigned int Index, uint64_t Mask)
- public void clearReserved()
- public bool containsResource(uint64_t ID) const
- public void dump() const
- public int getBufferSize() const
- public unsigned int getNumUnits() const
- public unsigned int getProcResourceID() const
- public uint64_t getReadyMask() const
- public uint64_t getResourceMask() const
- public bool isADispatchHazard() const
- public bool isAResourceGroup() const
- public llvm::mca::ResourceStateEvent isBufferAvailable() const
- public bool isBuffered() const
- public bool isInOrder() const
- public bool isReady(unsigned int NumUnits = 1) const
- public bool isReserved() const
- public void markSubResourceAsUsed(uint64_t ID)
- public void releaseBuffer()
- public void releaseSubResource(uint64_t ID)
- public bool reserveBuffer()
- public void setReserved()
Methods
¶ResourceState(
const llvm::MCProcResourceDesc& Desc,
unsigned int Index,
uint64_t Mask)
ResourceState(
const llvm::MCProcResourceDesc& Desc,
unsigned int Index,
uint64_t Mask)
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:215
Parameters
- const llvm::MCProcResourceDesc& Desc
- unsigned int Index
- uint64_t Mask
¶void clearReserved()
void clearReserved()
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:230
¶bool containsResource(uint64_t ID) const
bool containsResource(uint64_t ID) const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:238
Parameters
- uint64_t ID
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:289
¶int getBufferSize() const
int getBufferSize() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:220
¶unsigned int getNumUnits() const
unsigned int getNumUnits() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:250
¶unsigned int getProcResourceID() const
unsigned int getProcResourceID() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:217
¶uint64_t getReadyMask() const
uint64_t getReadyMask() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:219
¶uint64_t getResourceMask() const
uint64_t getResourceMask() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:218
¶bool isADispatchHazard() const
bool isADispatchHazard() const
Description
Returns true if this is an in-order dispatch/issue resource.
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:226
¶bool isAResourceGroup() const
bool isAResourceGroup() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:236
¶llvm::mca::ResourceStateEvent isBufferAvailable()
const
llvm::mca::ResourceStateEvent isBufferAvailable()
const
Description
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.
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:263
¶bool isBuffered() const
bool isBuffered() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:222
¶bool isInOrder() const
bool isInOrder() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:223
¶bool isReady(unsigned int NumUnits = 1) const
bool isReady(unsigned int NumUnits = 1) const
Description
Returs true if this resource is not reserved, and if there are at least `NumUnits` available units.
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:234
Parameters
- unsigned int NumUnits = 1
¶bool isReserved() const
bool isReserved() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:227
¶void markSubResourceAsUsed(uint64_t ID)
void markSubResourceAsUsed(uint64_t ID)
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:240
Parameters
- uint64_t ID
¶void releaseBuffer()
void releaseBuffer()
Description
Releases a slot in the buffer.
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:279
¶void releaseSubResource(uint64_t ID)
void releaseSubResource(uint64_t ID)
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:245
Parameters
- uint64_t ID
¶bool reserveBuffer()
bool reserveBuffer()
Description
Reserve a buffer slot. Returns true if the buffer is not full. It always returns true if BufferSize is set to zero.
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:269
¶void setReserved()
void setReserved()
Declared at: llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h:229