#include "AMDGPUCustomBehaviour.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "TargetInfo/AMDGPUTargetInfo.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/WithColor.h"
namespace llvm::mca {
void AMDGPUInstrPostProcess::postProcessInstruction(
std::unique_ptr<Instruction> &Inst, const MCInst &MCI) { … }
void AMDGPUInstrPostProcess::processWaitCnt(std::unique_ptr<Instruction> &Inst,
const MCInst &MCI) { … }
AMDGPUCustomBehaviour::AMDGPUCustomBehaviour(const MCSubtargetInfo &STI,
const mca::SourceMgr &SrcMgr,
const MCInstrInfo &MCII)
: … { … }
unsigned AMDGPUCustomBehaviour::checkCustomHazard(ArrayRef<InstRef> IssuedInst,
const InstRef &IR) { … }
unsigned AMDGPUCustomBehaviour::handleWaitCnt(ArrayRef<InstRef> IssuedInst,
const InstRef &IR) { … }
void AMDGPUCustomBehaviour::computeWaitCnt(const InstRef &IR, unsigned &Vmcnt,
unsigned &Expcnt, unsigned &Lgkmcnt,
unsigned &Vscnt) { … }
void AMDGPUCustomBehaviour::generateWaitCntInfo() { … }
bool AMDGPUCustomBehaviour::isVMEM(const MCInstrDesc &MCID) { … }
bool AMDGPUCustomBehaviour::hasModifiersSet(
const std::unique_ptr<Instruction> &Inst, unsigned OpName) const { … }
bool AMDGPUCustomBehaviour::isGWS(uint16_t Opcode) const { … }
bool AMDGPUCustomBehaviour::isAlwaysGDS(uint16_t Opcode) const { … }
}
usingnamespacellvm;
usingnamespacemca;
static CustomBehaviour *
createAMDGPUCustomBehaviour(const MCSubtargetInfo &STI,
const mca::SourceMgr &SrcMgr,
const MCInstrInfo &MCII) { … }
static InstrPostProcess *
createAMDGPUInstrPostProcess(const MCSubtargetInfo &STI,
const MCInstrInfo &MCII) { … }
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTargetMCA() { … }