LLVM  14.0.0git
Public Member Functions | List of all members
llvm::mca::Instruction Class Reference

An instruction propagated through the simulated instruction pipeline. More...

#include "llvm/MCA/Instruction.h"

Inheritance diagram for llvm::mca::Instruction:
Inheritance graph
[legend]
Collaboration diagram for llvm::mca::Instruction:
Collaboration graph
[legend]

Public Member Functions

 Instruction (const InstrDesc &D, const unsigned Opcode)
 
unsigned getRCUTokenID () const
 
unsigned getLSUTokenID () const
 
void setLSUTokenID (unsigned LSUTok)
 
uint64_t getUsedBuffers () const
 
void setUsedBuffers (uint64_t Mask)
 
void clearUsedBuffers ()
 
int getCyclesLeft () const
 
void dispatch (unsigned RCUTokenID)
 
void execute (unsigned IID)
 
void update ()
 
bool updateDispatched ()
 
bool updatePending ()
 
bool isDispatched () const
 
bool isPending () const
 
bool isReady () const
 
bool isExecuting () const
 
bool isExecuted () const
 
bool isRetired () const
 
bool isEliminated () const
 
void forceExecuted ()
 
void setEliminated ()
 
void retire ()
 
const CriticalDependencygetCriticalRegDep () const
 
const CriticalDependencygetCriticalMemDep () const
 
const CriticalDependencycomputeCriticalRegDep ()
 
void setCriticalMemDep (const CriticalDependency &MemDep)
 
uint64_t getCriticalResourceMask () const
 
void setCriticalResourceMask (uint64_t ResourceMask)
 
void cycleEvent ()
 
- Public Member Functions inherited from llvm::mca::InstructionBase
 InstructionBase (const InstrDesc &D, const unsigned Opcode)
 
SmallVectorImpl< WriteState > & getDefs ()
 
ArrayRef< WriteStategetDefs () const
 
SmallVectorImpl< ReadState > & getUses ()
 
ArrayRef< ReadStategetUses () const
 
const InstrDescgetDesc () const
 
unsigned getLatency () const
 
unsigned getNumMicroOps () const
 
unsigned getOpcode () const
 
const MCAOperandgetOperand (const unsigned Idx) const
 Return the MCAOperand which corresponds to index Idx within the original MCInst. More...
 
unsigned getNumOperands () const
 
void addOperand (const MCAOperand Op)
 
bool hasDependentUsers () const
 
unsigned getNumUsers () const
 
bool isOptimizableMove () const
 
void setOptimizableMove ()
 
bool isMemOp () const
 

Detailed Description

An instruction propagated through the simulated instruction pipeline.

This class is used to monitor changes to the internal state of instructions that are sent to the various components of the simulated hardware pipeline.

Definition at line 569 of file Instruction.h.

Constructor & Destructor Documentation

◆ Instruction()

llvm::mca::Instruction::Instruction ( const InstrDesc D,
const unsigned  Opcode 
)
inline

Definition at line 616 of file Instruction.h.

Member Function Documentation

◆ clearUsedBuffers()

void llvm::mca::Instruction::clearUsedBuffers ( )
inline

Definition at line 628 of file Instruction.h.

◆ computeCriticalRegDep()

const CriticalDependency & llvm::mca::Instruction::computeCriticalRegDep ( )

◆ cycleEvent()

void llvm::mca::Instruction::cycleEvent ( )

◆ dispatch()

void llvm::mca::Instruction::dispatch ( unsigned  RCUTokenID)

Definition at line 151 of file Instruction.cpp.

References assert(), updateDispatched(), and updatePending().

◆ execute()

void llvm::mca::Instruction::execute ( unsigned  IID)

◆ forceExecuted()

void llvm::mca::Instruction::forceExecuted ( )

Definition at line 176 of file Instruction.cpp.

References assert().

◆ getCriticalMemDep()

const CriticalDependency& llvm::mca::Instruction::getCriticalMemDep ( ) const
inline

Definition at line 669 of file Instruction.h.

◆ getCriticalRegDep()

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

Definition at line 668 of file Instruction.h.

◆ getCriticalResourceMask()

uint64_t llvm::mca::Instruction::getCriticalResourceMask ( ) const
inline

Definition at line 675 of file Instruction.h.

◆ getCyclesLeft()

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

Definition at line 630 of file Instruction.h.

Referenced by llvm::mca::MemoryGroup::onInstructionIssued().

◆ getLSUTokenID()

unsigned llvm::mca::Instruction::getLSUTokenID ( ) const
inline

Definition at line 623 of file Instruction.h.

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

◆ getRCUTokenID()

unsigned llvm::mca::Instruction::getRCUTokenID ( ) const
inline

Definition at line 622 of file Instruction.h.

Referenced by llvm::mca::RetireStage::execute().

◆ getUsedBuffers()

uint64_t llvm::mca::Instruction::getUsedBuffers ( ) const
inline

◆ isDispatched()

bool llvm::mca::Instruction::isDispatched ( ) const
inline

◆ isEliminated()

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

◆ isExecuted()

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

Definition at line 655 of file Instruction.h.

Referenced by llvm::mca::RegisterFile::onInstructionExecuted(), and retire().

◆ isExecuting()

bool llvm::mca::Instruction::isExecuting ( ) const
inline

Definition at line 654 of file Instruction.h.

Referenced by cycleEvent().

◆ isPending()

bool llvm::mca::Instruction::isPending ( ) const
inline

◆ isReady()

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

◆ isRetired()

bool llvm::mca::Instruction::isRetired ( ) const
inline

Definition at line 656 of file Instruction.h.

◆ retire()

void llvm::mca::Instruction::retire ( )
inline

Definition at line 663 of file Instruction.h.

References assert(), and isExecuted().

Referenced by llvm::mca::RetireControlUnit::consumeCurrentToken().

◆ setCriticalMemDep()

void llvm::mca::Instruction::setCriticalMemDep ( const CriticalDependency MemDep)
inline

Definition at line 671 of file Instruction.h.

◆ setCriticalResourceMask()

void llvm::mca::Instruction::setCriticalResourceMask ( uint64_t  ResourceMask)
inline

Definition at line 676 of file Instruction.h.

Referenced by llvm::mca::Scheduler::select().

◆ setEliminated()

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

Definition at line 661 of file Instruction.h.

◆ setLSUTokenID()

void llvm::mca::Instruction::setLSUTokenID ( unsigned  LSUTok)
inline

◆ setUsedBuffers()

void llvm::mca::Instruction::setUsedBuffers ( uint64_t  Mask)
inline

Definition at line 627 of file Instruction.h.

References llvm::BitmaskEnumDetail::Mask().

◆ update()

void llvm::mca::Instruction::update ( )

Definition at line 213 of file Instruction.cpp.

References isDispatched(), isPending(), updateDispatched(), and updatePending().

Referenced by cycleEvent().

◆ updateDispatched()

bool llvm::mca::Instruction::updateDispatched ( )

◆ updatePending()

bool llvm::mca::Instruction::updatePending ( )

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