LLVM 20.0.0git
|
This file implements the targeting of the InstructionSelector class for AMDGPU. More...
#include "AMDGPUInstructionSelector.h"
#include "AMDGPU.h"
#include "AMDGPUGlobalISelUtils.h"
#include "AMDGPUInstrInfo.h"
#include "AMDGPURegisterBankInfo.h"
#include "AMDGPUTargetMachine.h"
#include "SIMachineFunctionInfo.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h"
#include "llvm/CodeGen/GlobalISel/GISelKnownBits.h"
#include "llvm/CodeGen/GlobalISel/GenericMachineInstrs.h"
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include <optional>
#include "AMDGPUGenGlobalISel.inc"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "amdgpu-isel" |
#define | GET_GLOBALISEL_IMPL |
#define | AMDGPUSubtarget GCNSubtarget |
#define | GET_GLOBALISEL_PREDICATES_INIT |
#define | GET_GLOBALISEL_TEMPORARIES_INIT |
This file implements the targeting of the InstructionSelector class for AMDGPU.
Definition in file AMDGPUInstructionSelector.cpp.
#define AMDGPUSubtarget GCNSubtarget |
Definition at line 38 of file AMDGPUInstructionSelector.cpp.
#define DEBUG_TYPE "amdgpu-isel" |
Definition at line 32 of file AMDGPUInstructionSelector.cpp.
#define GET_GLOBALISEL_IMPL |
Definition at line 37 of file AMDGPUInstructionSelector.cpp.
#define GET_GLOBALISEL_PREDICATES_INIT |
#define GET_GLOBALISEL_TEMPORARIES_INIT |
|
static |
Definition at line 4953 of file AMDGPUInstructionSelector.cpp.
References llvm::MachineInstrBuilder::addImm().
|
static |
Definition at line 5002 of file AMDGPUInstructionSelector.cpp.
References B, buildRSRC(), llvm::Hi_32(), MRI, and TII.
|
static |
Definition at line 5011 of file AMDGPUInstructionSelector.cpp.
References B, buildRSRC(), llvm::Hi_32(), MRI, and TII.
|
static |
Definition at line 3858 of file AMDGPUInstructionSelector.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), B, llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::SIRegisterInfo::getSubRegFromChannel(), llvm_unreachable, MRI, and llvm::SmallVectorBase< Size_T >::size().
Referenced by selectWMMAModsNegAbs().
|
static |
Return a resource descriptor for use with an arbitrary 64-bit pointer.
If BasePtr
is not valid, a null base pointer will be used.
Definition at line 4959 of file AMDGPUInstructionSelector.cpp.
Referenced by buildAddr64RSrc(), and buildOffsetSrc().
|
static |
Return the register to use for the index value, and the subregister to use for the indirectly accessed register.
Definition at line 2968 of file AMDGPUInstructionSelector.cpp.
References assert(), llvm::AMDGPU::getBaseWithConstantOffset(), MRI, llvm::Offset, llvm::ArrayRef< T >::size(), and TRI.
|
static |
Get an immediate that must be 32-bits, and treated as zero extended.
Definition at line 5231 of file AMDGPUInstructionSelector.cpp.
References llvm::getIConstantVRegSExtVal(), llvm::Lo_32(), and MRI.
Definition at line 293 of file AMDGPUInstructionSelector.cpp.
References llvm_unreachable.
unsigned getNamedBarrierOp | ( | bool | HasInlineConst, |
Intrinsic::ID | IntrID | ||
) |
Definition at line 5404 of file AMDGPUInstructionSelector.cpp.
References llvm_unreachable.
|
static |
Definition at line 1100 of file AMDGPUInstructionSelector.cpp.
References llvm::CmpInst::FCMP_FALSE, llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OGT, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::FCMP_ORD, llvm::CmpInst::FCMP_TRUE, llvm::CmpInst::FCMP_UEQ, llvm::CmpInst::FCMP_UGE, llvm::CmpInst::FCMP_UGT, llvm::CmpInst::FCMP_ULE, llvm::CmpInst::FCMP_ULT, llvm::CmpInst::FCMP_UNE, llvm::CmpInst::FCMP_UNO, llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, llvm_unreachable, P, Select, and Size.
|
static |
Definition at line 71 of file AMDGPUInstructionSelector.cpp.
Definition at line 1634 of file AMDGPUInstructionSelector.cpp.
References llvm_unreachable.
|
static |
Definition at line 2665 of file AMDGPUInstructionSelector.cpp.
References MI.
Referenced by arePointersCompatible(), llvm::buildModuleSummaryIndex(), llvm::MDBuilder::createTBAANode(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::slpvectorizer::BoUpSLP::findReusedOrderedScalars(), getMemcpyLoadsAndStores(), and isSimpleVIDSequence().
|
static |
Definition at line 2507 of file AMDGPUInstructionSelector.cpp.
References assert(), llvm::LLT::fixed_vector(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getShuffleMask(), llvm::MIPatternMatch::m_GLShr(), llvm::MIPatternMatch::m_GTrunc(), llvm::MIPatternMatch::m_Reg(), llvm::MIPatternMatch::m_SpecificICst(), llvm::MIPatternMatch::mi_match(), MRI, stripBitCast(), and stripCopy().
Referenced by buildRegSequence16().
|
static |
Definition at line 4671 of file AMDGPUInstructionSelector.cpp.
References Addr, and llvm::MachineInstr::NoUWrap.
|
static |
Definition at line 2762 of file AMDGPUInstructionSelector.cpp.
References isVCmpResult(), MI, and MRI.
Referenced by isVCmpResult().
|
static |
Match a zero extend from a 32-bit value to 64-bits.
Definition at line 3236 of file AMDGPUInstructionSelector.cpp.
References assert(), llvm::getDefIgnoringCopies(), llvm::MIPatternMatch::m_GZExt(), llvm::MIPatternMatch::m_Reg(), llvm::PatternMatch::m_ZeroInt(), llvm::MIPatternMatch::mi_match(), MRI, and llvm::LLT::scalar().
Definition at line 1803 of file AMDGPUInstructionSelector.cpp.
|
static |
Definition at line 3886 of file AMDGPUInstructionSelector.cpp.
References assert(), buildRegSequence(), llvm::MIPatternMatch::m_GFabs(), llvm::MIPatternMatch::m_Reg(), llvm::MIPatternMatch::mi_match(), MRI, llvm::SISrcMods::NEG, llvm::SISrcMods::NEG_HI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorBase< Size_T >::size().
Size
bits will be an inline immediate. Definition at line 2326 of file AMDGPUInstructionSelector.cpp.
References Size.
|
static |
Definition at line 2500 of file AMDGPUInstructionSelector.cpp.
References llvm::MIPatternMatch::m_GBitcast(), llvm::MIPatternMatch::m_Reg(), llvm::MIPatternMatch::mi_match(), and MRI.
Referenced by isExtractHiElt().
|
static |
Definition at line 2496 of file AMDGPUInstructionSelector.cpp.
References llvm::getDefSrcRegIgnoringCopies(), and MRI.
Referenced by isExtractHiElt().