LLVM 17.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 selector state. | |
![]() | |
virtual | ~InstructionSelector ()=default |
virtual bool | select (MachineInstr &I)=0 |
Select the (possibly generic) instruction I to only use target-specific opcodes. | |
virtual void | setupGeneratedPerFunctionState (MachineFunction &MF) |
virtual void | setupMF (MachineFunction &mf, GISelKnownBits *KB, CodeGenCoverage &covinfo, ProfileSummaryInfo *psi, BlockFrequencyInfo *bfi) |
Setup per-MF selector state. | |
Static Public Member Functions | |
static const char * | getName () |
Additional Inherited Members | |
![]() | |
CodeGenCoverage * | CoverageInfo = nullptr |
GISelKnownBits * | KnownBits = nullptr |
MachineFunction * | MF = nullptr |
ProfileSummaryInfo * | PSI = nullptr |
BlockFrequencyInfo * | BFI = nullptr |
MachineBasicBlock * | CurMBB = nullptr |
![]() | |
using | ComplexRendererFns = std::optional< SmallVector< std::function< void(MachineInstrBuilder &)>, 4 > > |
using | RecordedMIVector = SmallVector< MachineInstr *, 4 > |
using | NewMIVector = SmallVector< MachineInstrBuilder, 4 > |
![]() | |
bool | shouldOptForSize (const MachineFunction *MF) const |
InstructionSelector () | |
template<class TgtInstructionSelector , class PredicateBitset , class ComplexMatcherMemFn , class CustomRendererFn > | |
bool | executeMatchTable (TgtInstructionSelector &ISel, NewMIVector &OutMIs, MatcherState &State, const ISelInfoTy< PredicateBitset, ComplexMatcherMemFn, CustomRendererFn > &ISelInfo, const int64_t *MatchTable, const TargetInstrInfo &TII, MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI, const RegisterBankInfo &RBI, const PredicateBitset &AvailableFeatures, CodeGenCoverage &CoverageInfo) const |
Execute a given matcher table and return true if the match was successful and false otherwise. | |
virtual const int64_t * | getMatchTable () const |
virtual bool | testImmPredicate_I64 (unsigned, int64_t) const |
virtual bool | testImmPredicate_APInt (unsigned, const APInt &) const |
virtual bool | testImmPredicate_APFloat (unsigned, const APFloat &) const |
virtual bool | testMIPredicate_MI (unsigned, const MachineInstr &, const std::array< const MachineOperand *, 3 > &Operands) const |
bool | isOperandImmEqual (const MachineOperand &MO, int64_t Value, const MachineRegisterInfo &MRI) const |
bool | isBaseWithConstantOffset (const MachineOperand &Root, const MachineRegisterInfo &MRI) const |
Return true if the specified operand is a G_PTR_ADD with a G_CONSTANT on the right-hand side. | |
bool | isObviouslySafeToFold (MachineInstr &MI, MachineInstr &IntoMI) const |
Return true if MI can obviously be folded into IntoMI. | |
Definition at line 48 of file AMDGPUInstructionSelector.h.
AMDGPUInstructionSelector::AMDGPUInstructionSelector | ( | const GCNSubtarget & | STI, |
const AMDGPURegisterBankInfo & | RBI, | ||
const AMDGPUTargetMachine & | TM | ||
) |
Definition at line 48 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 3320 of file AMDGPUInstructionSelector.cpp.
References assert(), llvm::InstructionSelector::CoverageInfo, llvm::AMDGPU::getImageDimIntrinsicInfo(), I, Intr, MRI, and llvm::LLT::scalar().
|
overridevirtual |
Setup per-MF selector state.
Reimplemented from llvm::InstructionSelector.
Definition at line 65 of file AMDGPUInstructionSelector.cpp.
References llvm::InstructionSelector::BFI, llvm::InstructionSelector::CoverageInfo, llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::InstructionSelector::MF, llvm::InstructionSelector::PSI, and llvm::InstructionSelector::setupMF().