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

Base class for instructions consumed by the simulation pipeline. More...

#include "llvm/MCA/Instruction.h"

Inheritance diagram for llvm::mca::InstructionBase:
Inheritance graph
[legend]

Public Member Functions

 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

Base class for instructions consumed by the simulation pipeline.

This class tracks data dependencies as well as generic properties of the instruction.

Definition at line 498 of file Instruction.h.

Constructor & Destructor Documentation

◆ InstructionBase()

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

Definition at line 521 of file Instruction.h.

References Operands.

Member Function Documentation

◆ addOperand()

void llvm::mca::InstructionBase::addOperand ( const MCAOperand  Op)
inline

Definition at line 545 of file Instruction.h.

References Operands.

◆ getDefs() [1/2]

SmallVectorImpl<WriteState>& llvm::mca::InstructionBase::getDefs ( )
inline

◆ getDefs() [2/2]

ArrayRef<WriteState> llvm::mca::InstructionBase::getDefs ( ) const
inline

Definition at line 525 of file Instruction.h.

◆ getDesc()

const InstrDesc& llvm::mca::InstructionBase::getDesc ( ) const
inline

◆ getLatency()

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

Definition at line 530 of file Instruction.h.

References llvm::mca::InstrDesc::MaxLatency.

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

◆ getNumMicroOps()

unsigned llvm::mca::InstructionBase::getNumMicroOps ( ) const
inline

◆ getNumOperands()

unsigned llvm::mca::InstructionBase::getNumOperands ( ) const
inline

Definition at line 544 of file Instruction.h.

References Operands.

◆ getNumUsers()

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

Definition at line 552 of file Instruction.h.

References llvm::tgtok::Def.

◆ getOpcode()

unsigned llvm::mca::InstructionBase::getOpcode ( ) const
inline

Definition at line 532 of file Instruction.h.

Referenced by llvm::mca::AMDGPUCustomBehaviour::checkCustomHazard().

◆ getOperand()

const MCAOperand* llvm::mca::InstructionBase::getOperand ( const unsigned  Idx) const
inline

Return the MCAOperand which corresponds to index Idx within the original MCInst.

Definition at line 536 of file Instruction.h.

References llvm::find_if(), and Operands.

◆ getUses() [1/2]

SmallVectorImpl<ReadState>& llvm::mca::InstructionBase::getUses ( )
inline

◆ getUses() [2/2]

ArrayRef<ReadState> llvm::mca::InstructionBase::getUses ( ) const
inline

Definition at line 527 of file Instruction.h.

References Uses.

◆ hasDependentUsers()

bool llvm::mca::InstructionBase::hasDependentUsers ( ) const
inline

Definition at line 547 of file Instruction.h.

References llvm::any_of(), and llvm::tgtok::Def.

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

◆ isMemOp()

bool llvm::mca::InstructionBase::isMemOp ( ) const
inline

◆ isOptimizableMove()

bool llvm::mca::InstructionBase::isOptimizableMove ( ) const
inline

Definition at line 560 of file Instruction.h.

◆ setOptimizableMove()

void llvm::mca::InstructionBase::setOptimizableMove ( )
inline

Definition at line 561 of file Instruction.h.


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