LLVM 22.0.0git
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:
[legend]

Public Member Functions

 Instruction (const InstrDesc &D, const unsigned Opcode)
LLVM_ABI void reset ()
unsigned getRCUTokenID () const
unsigned getLSUTokenID () const
void setLSUTokenID (unsigned LSUTok)
uint64_t getUsedBuffers () const
void setUsedBuffers (uint64_t Mask)
void clearUsedBuffers ()
int getCyclesLeft () const
LLVM_ABI void dispatch (unsigned RCUTokenID)
LLVM_ABI void execute (unsigned IID)
LLVM_ABI void update ()
LLVM_ABI bool updateDispatched ()
LLVM_ABI bool updatePending ()
bool isInvalid () const
bool isDispatched () const
bool isPending () const
bool isReady () const
bool isExecuting () const
bool isExecuted () const
bool isRetired () const
bool isEliminated () const
LLVM_ABI void forceExecuted ()
void setEliminated ()
void retire ()
const CriticalDependencygetCriticalRegDep () const
const CriticalDependencygetCriticalMemDep () const
LLVM_ABI const CriticalDependencycomputeCriticalRegDep ()
void setCriticalMemDep (const CriticalDependency &MemDep)
uint64_t getCriticalResourceMask () const
void setCriticalResourceMask (uint64_t ResourceMask)
LLVM_ABI 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
bool isALoadBarrier () const
bool isAStoreBarrier () const
void setLoadBarrier (bool IsBarrier)
void setStoreBarrier (bool IsBarrier)
const MCAOperandgetOperand (const unsigned Idx) const
 Return the MCAOperand which corresponds to index Idx within the original MCInst.
unsigned getNumOperands () const
void addOperand (const MCAOperand Op)
bool hasDependentUsers () const
unsigned getNumUsers () const
bool isOptimizableMove () const
void setOptimizableMove ()
void clearOptimizableMove ()
bool isMemOp () const
void setMayLoad (bool newVal)
void setMayStore (bool newVal)
void setHasSideEffects (bool newVal)
void setBeginGroup (bool newVal)
void setEndGroup (bool newVal)
void setRetireOOO (bool newVal)
bool getMayLoad () const
bool getMayStore () const
bool getHasSideEffects () const
bool getBeginGroup () const
bool getEndGroup () const
bool getRetireOOO () 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 605 of file Instruction.h.

Constructor & Destructor Documentation

◆ Instruction()

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

Member Function Documentation

◆ clearUsedBuffers()

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

Definition at line 666 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 170 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 195 of file Instruction.cpp.

References assert().

◆ getCriticalMemDep()

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

Definition at line 708 of file Instruction.h.

◆ getCriticalRegDep()

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

Definition at line 707 of file Instruction.h.

◆ getCriticalResourceMask()

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

Definition at line 714 of file Instruction.h.

◆ getCyclesLeft()

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

Definition at line 668 of file Instruction.h.

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

◆ getLSUTokenID()

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

Definition at line 661 of file Instruction.h.

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

◆ getRCUTokenID()

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

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

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

◆ isExecuting()

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

Definition at line 693 of file Instruction.h.

Referenced by cycleEvent().

◆ isInvalid()

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

Definition at line 689 of file Instruction.h.

◆ 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 695 of file Instruction.h.

◆ reset()

void llvm::mca::Instruction::reset ( )

◆ retire()

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

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

◆ setCriticalResourceMask()

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

Definition at line 715 of file Instruction.h.

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

◆ setEliminated()

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

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

◆ update()

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

Definition at line 232 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: