LLVM  15.0.0git
Namespaces | Macros | Functions
SPIRVInstructionSelector.cpp File Reference
#include "SPIRV.h"
#include "SPIRVGlobalRegistry.h"
#include "SPIRVInstrInfo.h"
#include "SPIRVRegisterBankInfo.h"
#include "SPIRVRegisterInfo.h"
#include "SPIRVTargetMachine.h"
#include "SPIRVUtils.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
#include "llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/IR/IntrinsicsSPIRV.h"
#include "llvm/Support/Debug.h"
#include "SPIRVGenGlobalISel.inc"
Include dependency graph for SPIRVInstructionSelector.cpp:

Go to the source code of this file.

Namespaces

 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
 

Functions

bool isTypeFoldingSupported (unsigned Opcode)
 
static SPIRV::MemorySemantics getMemSemantics (AtomicOrdering Ord)
 
static SPIRV::Scope getScope (SyncScope::ID Ord)
 
static void addMemoryOperands (MachineMemOperand *MemOp, MachineInstrBuilder &MIB)
 
static void addMemoryOperands (uint64_t Flags, MachineInstrBuilder &MIB)
 
static bool isGenericCastablePtr (SPIRV::StorageClass SC)
 
static unsigned getFCmpOpcode (unsigned PredNum)
 
static unsigned getICmpOpcode (unsigned PredNum)
 
static unsigned getPtrCmpOpcode (unsigned Pred)
 
static unsigned getBoolCmpOpcode (unsigned PredNum)
 
static bool isImm (const MachineOperand &MO, MachineRegisterInfo *MRI)
 
static int64_t foldImm (const MachineOperand &MO, MachineRegisterInfo *MRI)
 
InstructionSelectorllvm::createSPIRVInstructionSelector (const SPIRVTargetMachine &TM, const SPIRVSubtarget &Subtarget, const RegisterBankInfo &RBI)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "spirv-isel"

Definition at line 30 of file SPIRVInstructionSelector.cpp.

◆ GET_GLOBALISEL_IMPL

#define GET_GLOBALISEL_IMPL

Definition at line 173 of file SPIRVInstructionSelector.cpp.

◆ GET_GLOBALISEL_PREDICATE_BITSET

#define GET_GLOBALISEL_PREDICATE_BITSET

Definition at line 36 of file SPIRVInstructionSelector.cpp.

◆ GET_GLOBALISEL_PREDICATES_DECL

#define GET_GLOBALISEL_PREDICATES_DECL

Definition at line 59 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 63 of file SPIRVInstructionSelector.cpp.

◆ GET_GLOBALISEL_TEMPORARIES_INIT

#define GET_GLOBALISEL_TEMPORARIES_INIT

Function Documentation

◆ addMemoryOperands() [1/2]

static void addMemoryOperands ( MachineMemOperand MemOp,
MachineInstrBuilder MIB 
)
static

◆ addMemoryOperands() [2/2]

static void addMemoryOperands ( uint64_t  Flags,
MachineInstrBuilder MIB 
)
static

◆ foldImm()

static int64_t foldImm ( const MachineOperand MO,
MachineRegisterInfo MRI 
)
static

◆ getBoolCmpOpcode()

static unsigned getBoolCmpOpcode ( unsigned  PredNum)
static

Definition at line 705 of file SPIRVInstructionSelector.cpp.

References llvm_unreachable.

◆ getFCmpOpcode()

static unsigned getFCmpOpcode ( unsigned  PredNum)
static

Definition at line 629 of file SPIRVInstructionSelector.cpp.

References llvm_unreachable.

◆ getICmpOpcode()

static unsigned getICmpOpcode ( unsigned  PredNum)
static

Definition at line 665 of file SPIRVInstructionSelector.cpp.

References llvm_unreachable.

◆ getMemSemantics()

static SPIRV::MemorySemantics getMemSemantics ( AtomicOrdering  Ord)
static

Definition at line 390 of file SPIRVInstructionSelector.cpp.

References llvm::None, and Unordered.

◆ getPtrCmpOpcode()

static unsigned getPtrCmpOpcode ( unsigned  Pred)
static

Definition at line 693 of file SPIRVInstructionSelector.cpp.

References llvm_unreachable.

◆ getScope()

static SPIRV::Scope getScope ( SyncScope::ID  Ord)
static

◆ isGenericCastablePtr()

static bool isGenericCastablePtr ( SPIRV::StorageClass  SC)
static

Definition at line 576 of file SPIRVInstructionSelector.cpp.

References llvm::PPCISD::SC.

◆ isImm()

static bool isImm ( const MachineOperand MO,
MachineRegisterInfo MRI 
)
static

◆ isTypeFoldingSupported()

bool isTypeFoldingSupported ( unsigned  Opcode)

Definition at line 53 of file SPIRVLegalizerInfo.cpp.