LLVM: lib/Target/SPIRV/SPIRVInstructionSelector.cpp File Reference (original) (raw)

Go to the source code of this file.

Namespaces
namespace llvm
This is an optimization pass for GlobalISel generic memory operations.
Macros
#define DEBUG_TYPE "spirv-isel"
#define GET_GLOBALISEL_PREDICATE_BITSET
#define GET_GLOBALISEL_PREDICATES_DECL
#define GET_GLOBALISEL_TEMPORARIES_DECL
#define GET_GLOBALISEL_IMPL
#define GET_GLOBALISEL_PREDICATES_INIT
#define GET_GLOBALISEL_TEMPORARIES_INIT
Typedefs
using ExtInstList
Functions
static bool isConstReg (MachineRegisterInfo *MRI, MachineInstr *OpDef, SmallPtrSet< SPIRVType *, 4 > &Visited)
static bool isConstReg (MachineRegisterInfo *MRI, Register OpReg)
static bool intrinsicHasSideEffects (Intrinsic::ID ID)
static bool isOpcodeWithNoSideEffects (unsigned Opcode)
bool isDead (const MachineInstr &MI, const MachineRegisterInfo &MRI)
static bool mayApplyGenericSelection (unsigned Opcode)
static void addMemoryOperands (MachineMemOperand *MemOp, MachineInstrBuilder &MIB, MachineIRBuilder &MIRBuilder, SPIRVGlobalRegistry &GR)
static void addMemoryOperands (uint64_t Flags, MachineInstrBuilder &MIB)
static bool isUSMStorageClass (SPIRV::StorageClass::StorageClass SC)
static bool isASCastInGVar (MachineRegisterInfo *MRI, Register ResVReg)
static unsigned getFCmpOpcode (unsigned PredNum)
static unsigned getICmpOpcode (unsigned PredNum)
static unsigned getPtrCmpOpcode (unsigned Pred)
static unsigned getBoolCmpOpcode (unsigned PredNum)
static APFloat getZeroFP (const Type *LLVMFloatTy)
static APFloat getOneFP (const Type *LLVMFloatTy)
InstructionSelector * llvm::createSPIRVInstructionSelector (const SPIRVTargetMachine &TM, const SPIRVSubtarget &Subtarget, const RegisterBankInfo &RBI)

DEBUG_TYPE

#define DEBUG_TYPE "spirv-isel"

GET_GLOBALISEL_IMPL

#define GET_GLOBALISEL_IMPL

GET_GLOBALISEL_PREDICATE_BITSET

#define GET_GLOBALISEL_PREDICATE_BITSET

GET_GLOBALISEL_PREDICATES_DECL

#define GET_GLOBALISEL_PREDICATES_DECL

GET_GLOBALISEL_PREDICATES_INIT

#define GET_GLOBALISEL_PREDICATES_INIT

GET_GLOBALISEL_TEMPORARIES_DECL

#define GET_GLOBALISEL_TEMPORARIES_DECL

GET_GLOBALISEL_TEMPORARIES_INIT

#define GET_GLOBALISEL_TEMPORARIES_INIT

ExtInstList

addMemoryOperands() [1/2]

addMemoryOperands() [2/2]

getBoolCmpOpcode()

getFCmpOpcode()

Definition at line 2170 of file SPIRVInstructionSelector.cpp.

References 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_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, and llvm_unreachable.

getICmpOpcode()

Definition at line 2206 of file SPIRVInstructionSelector.cpp.

References 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, and llvm_unreachable.

getOneFP()

getPtrCmpOpcode()

getZeroFP()

intrinsicHasSideEffects()

isASCastInGVar()

isConstReg() [1/2]

Definition at line 463 of file SPIRVInstructionSelector.cpp.

References llvm::cast(), llvm::SmallPtrSetImpl< PtrType >::contains(), llvm::MachineInstr::getNumExplicitDefs(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::SmallPtrSetImpl< PtrType >::insert(), isConstReg(), llvm::MachineOperand::isReg(), MRI, and llvm::passCopy().

Referenced by isConstReg(), and isConstReg().

isConstReg() [2/2]

isDead()

Definition at line 625 of file SPIRVInstructionSelector.cpp.

References llvm::cast(), llvm::dbgs(), intrinsicHasSideEffects(), isOpcodeWithNoSideEffects(), llvm::isPreISelGenericOpcode(), LLVM_DEBUG, MI, MRI, Reg, and UseMI.

Referenced by llvm::finalizeBundle(), llvm::t1CondCodeOp(), and llvm::TailDuplicator::tailDuplicateAndUpdate().

isOpcodeWithNoSideEffects()

isUSMStorageClass()

bool isUSMStorageClass ( SPIRV::StorageClass::StorageClass SC) static

mayApplyGenericSelection()