class LSUnitBase
Declaration
class LSUnitBase : public HardwareUnit { /* full declaration omitted */ };
Description
Abstract base interface for LS (load/store) units in llvm-mca.
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:193
Inherits from: HardwareUnit
Member Variables
- private unsigned int LQSize
- A value of zero for this field means that the load queue is unbounded. Processor models can declare the size of a load queue via tablegen (see the definition of tablegen class LoadQueue in llvm/Target/TargetSchedule.td).
- private unsigned int SQSize
- A value of zero for this field means that the store queue is unbounded. Processor models can declare the size of a store queue via tablegen (see the definition of tablegen class StoreQueue in llvm/Target/TargetSchedule.td).
- private unsigned int UsedLQEntries
- private unsigned int UsedSQEntries
- private const bool NoAlias
- By default, the LS unit assumes that loads and stores don't alias with eachother. If this field is set to false, then loads are always assumed to alias with stores.
- private DenseMap<unsigned int, std::unique_ptr<MemoryGroup>> Groups
- Used to map group identifiers to MemoryGroups.
- private unsigned int NextGroupID
Method Overview
- public LSUnitBase(const llvm::MCSchedModel & SM, unsigned int LoadQueueSize, unsigned int StoreQueueSize, bool AssumeNoAlias)
- public void acquireLQSlot()
- public void acquireSQSlot()
- public bool assumeNoAlias() const
- public unsigned int createMemoryGroup()
- public virtual void cycleEvent()
- public virtual unsigned int dispatch(const llvm::mca::InstRef & IR)
- public void dump() const
- public const llvm::mca::MemoryGroup & getGroup(unsigned int Index) const
- public llvm::mca::MemoryGroup & getGroup(unsigned int Index)
- public unsigned int getLoadQueueSize() const
- public unsigned int getStoreQueueSize() const
- public unsigned int getUsedLQEntries() const
- public unsigned int getUsedSQEntries() const
- public bool hasDependentUsers(const llvm::mca::InstRef & IR) const
- public virtual llvm::mca::LSUnitBase::Status isAvailable(const llvm::mca::InstRef & IR) const
- public bool isLQEmpty() const
- public bool isLQFull() const
- public bool isPending(const llvm::mca::InstRef & IR) const
- public bool isReady(const llvm::mca::InstRef & IR) const
- public bool isSQEmpty() const
- public bool isSQFull() const
- public bool isValidGroupID(unsigned int Index) const
- public bool isWaiting(const llvm::mca::InstRef & IR) const
- public virtual void onInstructionExecuted(const llvm::mca::InstRef & IR)
- public virtual void onInstructionIssued(const llvm::mca::InstRef & IR)
- public virtual void onInstructionRetired(const llvm::mca::InstRef & IR)
- public void releaseLQSlot()
- public void releaseSQSlot()
- public virtual ~LSUnitBase()
Inherited from HardwareUnit:
Methods
¶LSUnitBase(const llvm::MCSchedModel& SM,
unsigned int LoadQueueSize,
unsigned int StoreQueueSize,
bool AssumeNoAlias)
LSUnitBase(const llvm::MCSchedModel& SM,
unsigned int LoadQueueSize,
unsigned int StoreQueueSize,
bool AssumeNoAlias)
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:225
Parameters
- const llvm::MCSchedModel& SM
- unsigned int LoadQueueSize
- unsigned int StoreQueueSize
- bool AssumeNoAlias
¶void acquireLQSlot()
void acquireLQSlot()
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:238
¶void acquireSQSlot()
void acquireSQSlot()
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:239
¶bool assumeNoAlias() const
bool assumeNoAlias() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:243
¶unsigned int createMemoryGroup()
unsigned int createMemoryGroup()
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:314
¶virtual void cycleEvent()
virtual void cycleEvent()
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:333
¶virtual unsigned int dispatch(
const llvm::mca::InstRef& IR)
virtual unsigned int dispatch(
const llvm::mca::InstRef& IR)
Description
Allocates LS resources for instruction IR. This method assumes that a previous call to `isAvailable(IR)` succeeded with a LSUnitBase::Status value of LSU_AVAILABLE. Returns the GroupID associated with this instruction. That value will be used to set the LSUTokenID field in class Instruction.
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:264
Parameters
- const llvm::mca::InstRef& IR
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:336
¶const llvm::mca::MemoryGroup& getGroup(
unsigned int Index) const
const llvm::mca::MemoryGroup& getGroup(
unsigned int Index) const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:304
Parameters
- unsigned int Index
¶llvm::mca::MemoryGroup& getGroup(
unsigned int Index)
llvm::mca::MemoryGroup& getGroup(
unsigned int Index)
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:309
Parameters
- unsigned int Index
¶unsigned int getLoadQueueSize() const
unsigned int getLoadQueueSize() const
Description
Returns the total number of entries in the load queue.
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:231
¶unsigned int getStoreQueueSize() const
unsigned int getStoreQueueSize() const
Description
Returns the total number of entries in the store queue.
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:234
¶unsigned int getUsedLQEntries() const
unsigned int getUsedLQEntries() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:236
¶unsigned int getUsedSQEntries() const
unsigned int getUsedSQEntries() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:237
¶bool hasDependentUsers(
const llvm::mca::InstRef& IR) const
bool hasDependentUsers(
const llvm::mca::InstRef& IR) const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:298
Parameters
- const llvm::mca::InstRef& IR
¶virtual llvm::mca::LSUnitBase::Status isAvailable(
const llvm::mca::InstRef& IR) const
virtual llvm::mca::LSUnitBase::Status isAvailable(
const llvm::mca::InstRef& IR) const
Description
This method checks the availability of the load/store buffers. Returns LSU_AVAILABLE if there are enough load/store queue entries to accomodate instruction IR. By default, LSU_AVAILABLE is returned if IR is not a memory operation.
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:256
Parameters
- const llvm::mca::InstRef& IR
¶bool isLQEmpty() const
bool isLQEmpty() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:267
¶bool isLQFull() const
bool isLQFull() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:269
¶bool isPending(const llvm::mca::InstRef& IR) const
bool isPending(const llvm::mca::InstRef& IR) const
Description
Check if instruction IR only depends on memory instructions that are currently executing.
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:284
Parameters
- const llvm::mca::InstRef& IR
¶bool isReady(const llvm::mca::InstRef& IR) const
bool isReady(const llvm::mca::InstRef& IR) const
Description
Check if a peviously dispatched instruction IR is now ready for execution.
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:276
Parameters
- const llvm::mca::InstRef& IR
¶bool isSQEmpty() const
bool isSQEmpty() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:266
¶bool isSQFull() const
bool isSQFull() const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:268
¶bool isValidGroupID(unsigned int Index) const
bool isValidGroupID(unsigned int Index) const
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:271
Parameters
- unsigned int Index
¶bool isWaiting(const llvm::mca::InstRef& IR) const
bool isWaiting(const llvm::mca::InstRef& IR) const
Description
Check if instruction IR is still waiting on memory operations, and the wait time is still unknown.
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:292
Parameters
- const llvm::mca::InstRef& IR
¶virtual void onInstructionExecuted(
const llvm::mca::InstRef& IR)
virtual void onInstructionExecuted(
const llvm::mca::InstRef& IR)
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:320
Parameters
- const llvm::mca::InstRef& IR
¶virtual void onInstructionIssued(
const llvm::mca::InstRef& IR)
virtual void onInstructionIssued(
const llvm::mca::InstRef& IR)
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:328
Parameters
- const llvm::mca::InstRef& IR
¶virtual void onInstructionRetired(
const llvm::mca::InstRef& IR)
virtual void onInstructionRetired(
const llvm::mca::InstRef& IR)
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:326
Parameters
- const llvm::mca::InstRef& IR
¶void releaseLQSlot()
void releaseLQSlot()
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:240
¶void releaseSQSlot()
void releaseSQSlot()
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:241
¶virtual ~LSUnitBase()
virtual ~LSUnitBase()
Declared at: llvm/include/llvm/MCA/HardwareUnits/LSUnit.h:228