LLVM 20.0.0git
|
#include "Target/AMDGPU/AMDGPUInstructionSelector.h"
Public Member Functions | |
AMDGPUInstructionSelector (const GCNSubtarget &STI, const AMDGPURegisterBankInfo &RBI, const AMDGPUTargetMachine &TM) | |
bool | select (MachineInstr &I) override |
Select the (possibly generic) instruction I to only use target-specific opcodes. | |
void | setupMF (MachineFunction &MF, GISelKnownBits *KB, CodeGenCoverage *CoverageInfo, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI) override |
Setup per-MF executor state. | |
Public Member Functions inherited from llvm::InstructionSelector | |
virtual | ~InstructionSelector () |
virtual bool | select (MachineInstr &I)=0 |
Select the (possibly generic) instruction I to only use target-specific opcodes. | |
Public Member Functions inherited from llvm::GIMatchTableExecutor | |
virtual | ~GIMatchTableExecutor ()=default |
virtual void | setupGeneratedPerFunctionState (MachineFunction &MF)=0 |
virtual void | setupMF (MachineFunction &mf, GISelKnownBits *kb, CodeGenCoverage *covinfo=nullptr, ProfileSummaryInfo *psi=nullptr, BlockFrequencyInfo *bfi=nullptr) |
Setup per-MF executor state. | |
Static Public Member Functions | |
static const char * | getName () |
Static Public Member Functions inherited from llvm::GIMatchTableExecutor | |
static LLVM_ATTRIBUTE_ALWAYS_INLINE uint64_t | fastDecodeULEB128 (const uint8_t *LLVM_ATTRIBUTE_RESTRICT MatchTable, uint64_t &CurrentIdx) |
Definition at line 48 of file AMDGPUInstructionSelector.h.
AMDGPUInstructionSelector::AMDGPUInstructionSelector | ( | const GCNSubtarget & | STI, |
const AMDGPURegisterBankInfo & | RBI, | ||
const AMDGPUTargetMachine & | TM | ||
) |
Definition at line 43 of file AMDGPUInstructionSelector.cpp.
|
overridevirtual |
Select the (possibly generic) instruction I
to only use target-specific opcodes.
It is OK to insert multiple instructions, but they cannot be generic pre-isel instructions.
Implements llvm::InstructionSelector.
Definition at line 3458 of file AMDGPUInstructionSelector.cpp.
References assert(), llvm::GIMatchTableExecutor::CoverageInfo, llvm::AMDGPU::getImageDimIntrinsicInfo(), llvm::AMDGPU::getIntrinsicID(), I, Intr, MRI, and llvm::LLT::scalar().
|
overridevirtual |
Setup per-MF executor state.
Reimplemented from llvm::GIMatchTableExecutor.
Definition at line 60 of file AMDGPUInstructionSelector.cpp.
References llvm::GIMatchTableExecutor::BFI, llvm::GCNSubtarget::checkSubtargetFeatures(), llvm::GIMatchTableExecutor::CoverageInfo, llvm::MachineFunction::getFunction(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::GIMatchTableExecutor::KB, llvm::GIMatchTableExecutor::MF, llvm::GIMatchTableExecutor::PSI, and llvm::GIMatchTableExecutor::setupMF().