LLVM 22.0.0git
SPIRVInstructionSelector.cpp File Reference

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)
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)
InstructionSelectorllvm::createSPIRVInstructionSelector (const SPIRVTargetMachine &TM, const SPIRVSubtarget &Subtarget, const RegisterBankInfo &RBI)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "spirv-isel"

Definition at line 36 of file SPIRVInstructionSelector.cpp.

◆ GET_GLOBALISEL_IMPL

#define GET_GLOBALISEL_IMPL

Definition at line 361 of file SPIRVInstructionSelector.cpp.

◆ GET_GLOBALISEL_PREDICATE_BITSET

#define GET_GLOBALISEL_PREDICATE_BITSET

Definition at line 58 of file SPIRVInstructionSelector.cpp.

◆ GET_GLOBALISEL_PREDICATES_DECL

#define GET_GLOBALISEL_PREDICATES_DECL

Definition at line 87 of file SPIRVInstructionSelector.cpp.

◆ GET_GLOBALISEL_PREDICATES_INIT

#define GET_GLOBALISEL_PREDICATES_INIT

◆ GET_GLOBALISEL_TEMPORARIES_DECL

#define GET_GLOBALISEL_TEMPORARIES_DECL

Definition at line 91 of file SPIRVInstructionSelector.cpp.

◆ GET_GLOBALISEL_TEMPORARIES_INIT

#define GET_GLOBALISEL_TEMPORARIES_INIT

Typedef Documentation

◆ ExtInstList

using ExtInstList
Initial value:
std::vector<std::pair<SPIRV::InstructionSet::InstructionSet, uint32_t>>

Definition at line 42 of file SPIRVInstructionSelector.cpp.

Function Documentation

◆ addMemoryOperands() [1/2]

◆ addMemoryOperands() [2/2]

◆ getBoolCmpOpcode()

unsigned getBoolCmpOpcode ( unsigned PredNum)
static

◆ getFCmpOpcode()

◆ getICmpOpcode()

◆ getOneFP()

◆ getPtrCmpOpcode()

unsigned getPtrCmpOpcode ( unsigned Pred)
static

◆ getZeroFP()

◆ isASCastInGVar()

bool isASCastInGVar ( MachineRegisterInfo * MRI,
Register ResVReg )
static

Definition at line 1601 of file SPIRVInstructionSelector.cpp.

References llvm::all_of(), and MRI.

◆ isConstReg() [1/2]

◆ isConstReg() [2/2]

bool isConstReg ( MachineRegisterInfo * MRI,
Register OpReg )
static

Definition at line 477 of file SPIRVInstructionSelector.cpp.

References isConstReg(), and MRI.

◆ isDead()

◆ isUSMStorageClass()

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

Definition at line 1590 of file SPIRVInstructionSelector.cpp.

◆ mayApplyGenericSelection()

bool mayApplyGenericSelection ( unsigned Opcode)
static

Definition at line 588 of file SPIRVInstructionSelector.cpp.

References llvm::isTypeFoldingSupported().