LLVM  8.0.1
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, unsigned RegID, bool clearsSuperRegs=false, bool writesZero=false)
 
 WriteState (const WriteState &Other)=default
 
WriteStateoperator= (const WriteState &Other)=default
 
int getCyclesLeft () const
 
unsigned getWriteResourceID () const
 
unsigned getRegisterID () const
 
unsigned getRegisterFileID () const
 
unsigned getLatency () const
 
void addUser (ReadState *Use, int ReadAdvance)
 
void addUser (WriteState *Use)
 
unsigned getDependentWriteCyclesLeft () const
 
unsigned getNumUsers () const
 
bool clearsSuperRegisters () const
 
bool isWriteZero () const
 
bool isEliminated () const
 
bool isExecuted () const
 
const WriteStategetDependentWrite () const
 
void setDependentWrite (WriteState *Other)
 
void writeStartEvent (unsigned Cycles)
 
void setWriteZero ()
 
void setEliminated ()
 
void setPRF (unsigned PRF)
 
void cycleEvent ()
 
void onInstructionIssued ()
 
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 90 of file Instruction.h.

Constructor & Destructor Documentation

◆ WriteState() [1/2]

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

Definition at line 139 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 ( ReadState Use,
int  ReadAdvance 
)

◆ addUser() [2/2]

void llvm::mca::WriteState::addUser ( WriteState Use)

◆ clearsSuperRegisters()

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

◆ cycleEvent()

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

Definition at line 86 of file Instruction.cpp.

References llvm::mca::UNKNOWN_CYCLES.

◆ dump()

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

◆ getCyclesLeft()

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

Definition at line 149 of file Instruction.h.

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

◆ getDependentWrite()

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

Definition at line 176 of file Instruction.h.

◆ getDependentWriteCyclesLeft()

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

Definition at line 158 of file Instruction.h.

◆ getLatency()

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

Definition at line 153 of file Instruction.h.

References llvm::mca::WriteDescriptor::Latency.

◆ getNumUsers()

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

◆ getRegisterFileID()

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

Definition at line 152 of file Instruction.h.

◆ getRegisterID()

unsigned 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 172 of file Instruction.h.

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

◆ isWriteZero()

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

◆ onInstructionIssued()

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

◆ operator=()

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

◆ setDependentWrite()

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

Definition at line 177 of file Instruction.h.

Referenced by addUser().

◆ setEliminated()

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

Definition at line 184 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 190 of file Instruction.h.

References llvm::dump().

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

◆ setWriteZero()

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

Definition at line 183 of file Instruction.h.

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

◆ writeStartEvent()

void llvm::mca::WriteState::writeStartEvent ( unsigned  Cycles)
inline

Definition at line 178 of file Instruction.h.

Referenced by addUser().


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