LLVM 20.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]

Public Member Functions

 Instruction (const InstrDesc &D, const unsigned Opcode)
 
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
 
void dispatch (unsigned RCUTokenID)
 
void execute (unsigned IID)
 
void update ()
 
bool updateDispatched ()
 
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
 
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
 
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 600 of file Instruction.h.

Constructor & Destructor Documentation

◆ Instruction()

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

Definition at line 647 of file Instruction.h.

Member Function Documentation

◆ clearUsedBuffers()

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

Definition at line 661 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 163 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 188 of file Instruction.cpp.

References assert().

◆ getCriticalMemDep()

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

Definition at line 703 of file Instruction.h.

◆ getCriticalRegDep()

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

Definition at line 702 of file Instruction.h.

◆ getCriticalResourceMask()

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

Definition at line 709 of file Instruction.h.

◆ getCyclesLeft()

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

Definition at line 663 of file Instruction.h.

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

◆ getLSUTokenID()

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

Definition at line 656 of file Instruction.h.

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

◆ getRCUTokenID()

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

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

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

◆ isExecuting()

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

Definition at line 688 of file Instruction.h.

Referenced by cycleEvent().

◆ isInvalid()

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

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

◆ reset()

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

◆ retire()

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

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

◆ setCriticalResourceMask()

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

Definition at line 710 of file Instruction.h.

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

◆ setEliminated()

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

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

◆ update()

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

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