LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::mca::WriteState Class Reference

Tracks uses of a register definition (e.g. More...

#include "llvm/MCA/Instruction.h"

Public Member Functions

 WriteState (const WriteDescriptor &Desc, MCPhysReg RegID, bool clearsSuperRegs=false, bool writesZero=false)
 
 WriteState (const WriteState &Other)=default
 
WriteStateoperator= (const WriteState &Other)=default
 
int getCyclesLeft () const
 
unsigned getWriteResourceID () const
 
MCPhysReg getRegisterID () const
 
unsigned getRegisterFileID () const
 
unsigned getLatency () const
 
unsigned getDependentWriteCyclesLeft () const
 
const WriteStategetDependentWrite () const
 
const CriticalDependencygetCriticalRegDep () const
 
void addUser (unsigned IID, ReadState *Use, int ReadAdvance)
 
void addUser (unsigned IID, WriteState *Use)
 
unsigned getNumUsers () const
 
bool clearsSuperRegisters () const
 
bool isWriteZero () const
 
bool isEliminated () const
 
bool isReady () const
 
bool isExecuted () const
 
void setDependentWrite (const WriteState *Other)
 
void writeStartEvent (unsigned IID, MCPhysReg RegID, unsigned Cycles)
 
void setWriteZero ()
 
void setEliminated ()
 
void setPRF (unsigned PRF)
 
void cycleEvent ()
 
void onInstructionIssued (unsigned IID)
 
void dump () const
 

Detailed Description

Tracks uses of a register definition (e.g.

register write).

Each implicit/explicit register write is associated with an instance of this class. A WriteState object tracks the dependent users of a register write. It also tracks how many cycles are left before the write back stage.

Definition at line 99 of file Instruction.h.

Constructor & Destructor Documentation

◆ WriteState() [1/2]

llvm::mca::WriteState::WriteState ( const WriteDescriptor Desc,
MCPhysReg  RegID,
bool  clearsSuperRegs = false,
bool  writesZero = false 
)
inline

Definition at line 150 of file Instruction.h.

References Other.

◆ WriteState() [2/2]

llvm::mca::WriteState::WriteState ( const WriteState Other)
default

Member Function Documentation

◆ addUser() [1/2]

void llvm::mca::WriteState::addUser ( unsigned  IID,
ReadState Use,
int  ReadAdvance 
)

◆ addUser() [2/2]

void llvm::mca::WriteState::addUser ( unsigned  IID,
WriteState Use 
)

◆ clearsSuperRegisters()

bool llvm::mca::WriteState::clearsSuperRegisters ( ) const
inline

◆ cycleEvent()

void llvm::mca::WriteState::cycleEvent ( )

Definition at line 95 of file Instruction.cpp.

References llvm::mca::UNKNOWN_CYCLES.

◆ dump()

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

◆ getCriticalRegDep()

const CriticalDependency& llvm::mca::WriteState::getCriticalRegDep ( ) const
inline

Definition at line 169 of file Instruction.h.

◆ getCyclesLeft()

int llvm::mca::WriteState::getCyclesLeft ( ) const
inline

Definition at line 160 of file Instruction.h.

Referenced by dump(), and llvm::mca::RegisterFile::removeRegisterWrite().

◆ getDependentWrite()

const WriteState* llvm::mca::WriteState::getDependentWrite ( ) const
inline

Definition at line 168 of file Instruction.h.

◆ getDependentWriteCyclesLeft()

unsigned llvm::mca::WriteState::getDependentWriteCyclesLeft ( ) const
inline

Definition at line 165 of file Instruction.h.

◆ getLatency()

unsigned llvm::mca::WriteState::getLatency ( ) const
inline

◆ getNumUsers()

unsigned llvm::mca::WriteState::getNumUsers ( ) const
inline

◆ getRegisterFileID()

unsigned llvm::mca::WriteState::getRegisterFileID ( ) const
inline

Definition at line 163 of file Instruction.h.

◆ getRegisterID()

MCPhysReg llvm::mca::WriteState::getRegisterID ( ) const
inline

◆ getWriteResourceID()

unsigned llvm::mca::WriteState::getWriteResourceID ( ) const
inline

◆ isEliminated()

bool llvm::mca::WriteState::isEliminated ( ) const
inline

◆ isExecuted()

bool llvm::mca::WriteState::isExecuted ( ) const
inline

Definition at line 199 of file Instruction.h.

Referenced by llvm::mca::WriteRef::isAvailable().

◆ isReady()

bool llvm::mca::WriteState::isReady ( ) const
inline

Definition at line 192 of file Instruction.h.

References getLatency().

Referenced by llvm::mca::Instruction::cycleEvent().

◆ isWriteZero()

bool llvm::mca::WriteState::isWriteZero ( ) const
inline

◆ onInstructionIssued()

void llvm::mca::WriteState::onInstructionIssued ( unsigned  IID)

◆ operator=()

WriteState& llvm::mca::WriteState::operator= ( const WriteState Other)
default

◆ setDependentWrite()

void llvm::mca::WriteState::setDependentWrite ( const WriteState Other)
inline

Definition at line 203 of file Instruction.h.

Referenced by addUser().

◆ setEliminated()

void llvm::mca::WriteState::setEliminated ( )
inline

Definition at line 206 of file Instruction.h.

References assert(), and llvm::SmallVectorBase::empty().

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

◆ setPRF()

void llvm::mca::WriteState::setPRF ( unsigned  PRF)
inline

Definition at line 212 of file Instruction.h.

References llvm::dump().

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

◆ setWriteZero()

void llvm::mca::WriteState::setWriteZero ( )
inline

Definition at line 205 of file Instruction.h.

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

◆ writeStartEvent()

void llvm::mca::WriteState::writeStartEvent ( unsigned  IID,
MCPhysReg  RegID,
unsigned  Cycles 
)

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