LLVM 20.0.0git
Public Member Functions | List of all members
llvm::mca::AMDGPUCustomBehaviour Class Reference

#include "Target/AMDGPU/MCA/AMDGPUCustomBehaviour.h"

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

Public Member Functions

 AMDGPUCustomBehaviour (const MCSubtargetInfo &STI, const mca::SourceMgr &SrcMgr, const MCInstrInfo &MCII)
 
 ~AMDGPUCustomBehaviour ()=default
 
unsigned checkCustomHazard (ArrayRef< InstRef > IssuedInst, const InstRef &IR) override
 This method is used to determine if an instruction should be allowed to be dispatched.
 
- Public Member Functions inherited from llvm::mca::CustomBehaviour
 CustomBehaviour (const MCSubtargetInfo &STI, const mca::SourceMgr &SrcMgr, const MCInstrInfo &MCII)
 
virtual ~CustomBehaviour ()
 
virtual unsigned checkCustomHazard (ArrayRef< InstRef > IssuedInst, const InstRef &IR)
 Before the llvm-mca pipeline dispatches an instruction, it first checks for any register or resource dependencies / hazards.
 
virtual std::vector< std::unique_ptr< View > > getStartViews (llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)
 Return a vector of Views that will be added before all other Views.
 
virtual std::vector< std::unique_ptr< View > > getPostInstrInfoViews (llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)
 Return a vector of Views that will be added after the InstructionInfoView.
 
virtual std::vector< std::unique_ptr< View > > getEndViews (llvm::MCInstPrinter &IP, llvm::ArrayRef< llvm::MCInst > Insts)
 Return a vector of Views that will be added after all other Views.
 

Additional Inherited Members

- Protected Attributes inherited from llvm::mca::CustomBehaviour
const MCSubtargetInfoSTI
 
const mca::SourceMgrSrcMgr
 
const MCInstrInfoMCII
 

Detailed Description

Definition at line 47 of file AMDGPUCustomBehaviour.h.

Constructor & Destructor Documentation

◆ AMDGPUCustomBehaviour()

llvm::mca::AMDGPUCustomBehaviour::AMDGPUCustomBehaviour ( const MCSubtargetInfo STI,
const mca::SourceMgr SrcMgr,
const MCInstrInfo MCII 
)

Definition at line 61 of file AMDGPUCustomBehaviour.cpp.

◆ ~AMDGPUCustomBehaviour()

llvm::mca::AMDGPUCustomBehaviour::~AMDGPUCustomBehaviour ( )
default

Member Function Documentation

◆ checkCustomHazard()

unsigned llvm::mca::AMDGPUCustomBehaviour::checkCustomHazard ( ArrayRef< InstRef IssuedInst,
const InstRef IR 
)
overridevirtual

This method is used to determine if an instruction should be allowed to be dispatched.

The return value is how many cycles until the instruction can be dispatched. This method is called after MCA has already checked for register and hardware dependencies so this method should only implement custom behaviour and dependencies that are not picked up by MCA naturally.

Reimplemented from llvm::mca::CustomBehaviour.

Definition at line 68 of file AMDGPUCustomBehaviour.cpp.

References llvm::mca::InstructionBase::getOpcode(), and IR.


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