LLVM 24.0.0git
llvm::mca::LSUnit::MemoryGroup Class Reference

A node of a memory dependency graph. More...

#include "llvm/MCA/HardwareUnits/LSUnit.h"

Public Member Functions

 MemoryGroup ()=default
 MemoryGroup (MemoryGroup &&)=default
size_t getNumSuccessors () const
unsigned getNumPredecessors () const
unsigned getNumExecutingPredecessors () const
unsigned getNumExecutedPredecessors () const
unsigned getNumInstructions () const
unsigned getNumExecuting () const
unsigned getNumExecuted () const
const InstRef & getCriticalMemoryInstruction () const
const CriticalDependency & getCriticalPredecessor () const
void addSuccessor (MemoryGroup *Group, bool IsDataDependent)
bool isWaiting () const
bool isPending () const
bool isReady () const
bool isExecuting () const
bool isExecuted () const
void onGroupIssued (const InstRef &IR, bool ShouldUpdateCriticalDep)
void onGroupExecuted ()
void onInstructionIssued (const InstRef &IR)
void onInstructionExecuted (const InstRef &IR)
void addInstruction ()
void cycleEvent ()

Detailed Description

A node of a memory dependency graph.

A MemoryGroup describes a set of instructions with same memory dependencies.

By construction, instructions of a MemoryGroup don't depend on each other. At dispatch stage, instructions are mapped by the LSUnit to MemoryGroups. A Memory group identifier is then stored as a "token" in field Instruction::LSUTokenID of each dispatched instructions. That token is used internally by the LSUnit to track memory dependencies.

Definition at line 246 of file LSUnit.h.

Constructor & Destructor Documentation

◆ MemoryGroup() [1/2]

llvm::mca::LSUnit::MemoryGroup::MemoryGroup ( )
default

◆ MemoryGroup() [2/2]

llvm::mca::LSUnit::MemoryGroup::MemoryGroup ( MemoryGroup && )
default

Member Function Documentation

◆ addInstruction()

void llvm::mca::LSUnit::MemoryGroup::addInstruction ( )
inline

Definition at line 391 of file LSUnit.h.

References assert(), and getNumSuccessors().

Referenced by llvm::mca::LSUnit::dispatch().

◆ addSuccessor()

void llvm::mca::LSUnit::MemoryGroup::addSuccessor ( MemoryGroup * Group,
bool IsDataDependent )
inline

Definition at line 290 of file LSUnit.h.

References assert(), isExecuted(), isExecuting(), and onGroupIssued().

Referenced by llvm::mca::LSUnit::dispatch().

◆ cycleEvent()

void llvm::mca::LSUnit::MemoryGroup::cycleEvent ( )
inline

Definition at line 396 of file LSUnit.h.

References isWaiting().

◆ getCriticalMemoryInstruction()

const InstRef & llvm::mca::LSUnit::MemoryGroup::getCriticalMemoryInstruction ( ) const
inline

Definition at line 283 of file LSUnit.h.

◆ getCriticalPredecessor()

const CriticalDependency & llvm::mca::LSUnit::MemoryGroup::getCriticalPredecessor ( ) const
inline

Definition at line 286 of file LSUnit.h.

Referenced by llvm::mca::LSUnit::getCriticalPredecessor().

◆ getNumExecuted()

unsigned llvm::mca::LSUnit::MemoryGroup::getNumExecuted ( ) const
inline

Definition at line 281 of file LSUnit.h.

Referenced by llvm::mca::LSUnit::dump().

◆ getNumExecutedPredecessors()

unsigned llvm::mca::LSUnit::MemoryGroup::getNumExecutedPredecessors ( ) const
inline

Definition at line 276 of file LSUnit.h.

Referenced by llvm::mca::LSUnit::dump().

◆ getNumExecuting()

unsigned llvm::mca::LSUnit::MemoryGroup::getNumExecuting ( ) const
inline

Definition at line 280 of file LSUnit.h.

Referenced by llvm::mca::LSUnit::dump().

◆ getNumExecutingPredecessors()

unsigned llvm::mca::LSUnit::MemoryGroup::getNumExecutingPredecessors ( ) const
inline

Definition at line 273 of file LSUnit.h.

Referenced by llvm::mca::LSUnit::dump().

◆ getNumInstructions()

unsigned llvm::mca::LSUnit::MemoryGroup::getNumInstructions ( ) const
inline

Definition at line 279 of file LSUnit.h.

Referenced by llvm::mca::LSUnit::dump().

◆ getNumPredecessors()

unsigned llvm::mca::LSUnit::MemoryGroup::getNumPredecessors ( ) const
inline

Definition at line 272 of file LSUnit.h.

Referenced by llvm::mca::LSUnit::dump().

◆ getNumSuccessors()

size_t llvm::mca::LSUnit::MemoryGroup::getNumSuccessors ( ) const
inline

Definition at line 269 of file LSUnit.h.

Referenced by addInstruction(), and llvm::mca::LSUnit::hasDependentUsers().

◆ isExecuted()

bool llvm::mca::LSUnit::MemoryGroup::isExecuted ( ) const
inline

◆ isExecuting()

bool llvm::mca::LSUnit::MemoryGroup::isExecuting ( ) const
inline

Definition at line 318 of file LSUnit.h.

Referenced by addSuccessor(), and onInstructionIssued().

◆ isPending()

bool llvm::mca::LSUnit::MemoryGroup::isPending ( ) const
inline

Definition at line 312 of file LSUnit.h.

Referenced by llvm::mca::LSUnit::isPending().

◆ isReady()

bool llvm::mca::LSUnit::MemoryGroup::isReady ( ) const
inline

◆ isWaiting()

bool llvm::mca::LSUnit::MemoryGroup::isWaiting ( ) const
inline

Definition at line 308 of file LSUnit.h.

Referenced by cycleEvent(), and llvm::mca::LSUnit::isWaiting().

◆ onGroupExecuted()

void llvm::mca::LSUnit::MemoryGroup::onGroupExecuted ( )
inline

Definition at line 337 of file LSUnit.h.

References assert(), and isReady().

◆ onGroupIssued()

void llvm::mca::LSUnit::MemoryGroup::onGroupIssued ( const InstRef & IR,
bool ShouldUpdateCriticalDep )
inline

Definition at line 323 of file LSUnit.h.

References assert(), IR, and isReady().

Referenced by addSuccessor().

◆ onInstructionExecuted()

void llvm::mca::LSUnit::MemoryGroup::onInstructionExecuted ( const InstRef & IR)
inline

Definition at line 372 of file LSUnit.h.

References assert(), IR, isExecuted(), and isReady().

◆ onInstructionIssued()

void llvm::mca::LSUnit::MemoryGroup::onInstructionIssued ( const InstRef & IR)
inline

Definition at line 343 of file LSUnit.h.

References assert(), llvm::mca::Instruction::getCyclesLeft(), IR, and isExecuting().


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