LLVM 22.0.0git
llvm::mca::WriteRef Class Reference

A reference to a register write. More...

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

Public Member Functions

 WriteRef ()
 WriteRef (unsigned SourceIndex, WriteState *WS)
unsigned getSourceIndex () const
unsigned getWriteBackCycle () const
const WriteStategetWriteState () const
WriteStategetWriteState ()
unsigned getWriteResourceID () const
MCPhysReg getRegisterID () const
void commit ()
void notifyExecuted (unsigned Cycle)
bool hasKnownWriteBackCycle () const
bool isWriteZero () const
bool isValid () const
bool isAvailable () const
 Returns true if this register write has been executed, and the new register value is therefore available to users.
bool operator== (const WriteRef &Other) const
void dump () const

Detailed Description

A reference to a register write.

This class is mainly used by the register file to describe register mappings. It correlates a register write to the source index of the defining instruction.

Definition at line 38 of file RegisterFile.h.

Constructor & Destructor Documentation

◆ WriteRef() [1/2]

llvm::mca::WriteRef::WriteRef ( )
inline

Definition at line 48 of file RegisterFile.h.

Referenced by operator==().

◆ WriteRef() [2/2]

llvm::mca::WriteRef::WriteRef ( unsigned SourceIndex,
WriteState * WS )

Definition at line 32 of file RegisterFile.cpp.

Member Function Documentation

◆ commit()

void llvm::mca::WriteRef::commit ( )

Definition at line 36 of file RegisterFile.cpp.

References assert().

Referenced by llvm::mca::RegisterFile::removeRegisterWrite().

◆ dump()

void llvm::mca::WriteRef::dump ( ) const

◆ getRegisterID()

MCPhysReg llvm::mca::WriteRef::getRegisterID ( ) const

Definition at line 63 of file RegisterFile.cpp.

◆ getSourceIndex()

unsigned llvm::mca::WriteRef::getSourceIndex ( ) const
inline

◆ getWriteBackCycle()

unsigned llvm::mca::WriteRef::getWriteBackCycle ( ) const

◆ getWriteResourceID()

unsigned llvm::mca::WriteRef::getWriteResourceID ( ) const

Definition at line 57 of file RegisterFile.cpp.

Referenced by llvm::mca::RegisterFile::collectWrites().

◆ getWriteState() [1/2]

WriteState * llvm::mca::WriteRef::getWriteState ( )
inline

Definition at line 57 of file RegisterFile.h.

◆ getWriteState() [2/2]

◆ hasKnownWriteBackCycle()

bool llvm::mca::WriteRef::hasKnownWriteBackCycle ( ) const

◆ isAvailable()

bool llvm::mca::WriteRef::isAvailable ( ) const
inline

Returns true if this register write has been executed, and the new register value is therefore available to users.

Definition at line 70 of file RegisterFile.h.

References hasKnownWriteBackCycle().

◆ isValid()

bool llvm::mca::WriteRef::isValid ( ) const
inline

Definition at line 66 of file RegisterFile.h.

References getSourceIndex().

Referenced by dump(), hasKnownWriteBackCycle(), and isWriteZero().

◆ isWriteZero()

bool llvm::mca::WriteRef::isWriteZero ( ) const

◆ notifyExecuted()

void llvm::mca::WriteRef::notifyExecuted ( unsigned Cycle)

Definition at line 43 of file RegisterFile.cpp.

References assert().

Referenced by llvm::mca::RegisterFile::onInstructionExecuted().

◆ operator==()

bool llvm::mca::WriteRef::operator== ( const WriteRef & Other) const
inline

Definition at line 72 of file RegisterFile.h.

References llvm::Other, and WriteRef().


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