LLVM  13.0.0git
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 

Definition at line 150 of file Instruction.h.

◆ WriteState() [2/2]

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

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 

Definition at line 84 of file Instruction.cpp.

References assert(), llvm::max(), and llvm::mca::UNKNOWN_CYCLES.

◆ clearsSuperRegisters()

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

◆ 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

Definition at line 169 of file Instruction.h.

◆ getCyclesLeft()

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

◆ getDependentWrite()

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

Definition at line 168 of file Instruction.h.

◆ getDependentWriteCyclesLeft()

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

Definition at line 165 of file Instruction.h.

Referenced by isReady().

◆ getLatency()

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

Definition at line 164 of file Instruction.h.

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

Referenced by dump(), isReady(), and onInstructionIssued().

◆ getNumUsers()

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

Definition at line 181 of file Instruction.h.

References Users.

◆ getRegisterFileID()

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

Definition at line 163 of file Instruction.h.

◆ getRegisterID()

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

◆ getWriteResourceID()

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

◆ isEliminated()

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

◆ isExecuted()

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

Definition at line 199 of file Instruction.h.

References llvm::mca::UNKNOWN_CYCLES.

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

◆ isReady()

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

Definition at line 192 of file Instruction.h.

References getDependentWriteCyclesLeft(), and getLatency().

◆ isWriteZero()

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

◆ onInstructionIssued()

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

◆ operator=()

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

◆ setDependentWrite()

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

Definition at line 203 of file Instruction.h.

References Other.

◆ setEliminated()

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

Definition at line 206 of file Instruction.h.

References assert(), and Users.

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

◆ setPRF()

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

Definition at line 212 of file Instruction.h.

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

◆ setWriteZero()

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

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: