LLVM  15.0.0git
Macros | Functions
SPIRVPreLegalizer.cpp File Reference
#include "SPIRV.h"
#include "SPIRVGlobalRegistry.h"
#include "SPIRVSubtarget.h"
#include "SPIRVUtils.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/IntrinsicsSPIRV.h"
#include "llvm/Target/TargetIntrinsicInfo.h"
Include dependency graph for SPIRVPreLegalizer.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "spirv-prelegalizer"
 

Functions

static bool isSpvIntrinsic (MachineInstr &MI, Intrinsic::ID IntrinsicID)
 
static void foldConstantsIntoIntrinsics (MachineFunction &MF)
 
static void insertBitcasts (MachineFunction &MF, SPIRVGlobalRegistry *GR, MachineIRBuilder MIB)
 
static SPIRVTypepropagateSPIRVType (MachineInstr *MI, SPIRVGlobalRegistry *GR, MachineRegisterInfo &MRI, MachineIRBuilder &MIB)
 
static Register insertAssignInstr (Register Reg, Type *Ty, SPIRVType *SpirvTy, SPIRVGlobalRegistry *GR, MachineIRBuilder &MIB, MachineRegisterInfo &MRI)
 
static void generateAssignInstrs (MachineFunction &MF, SPIRVGlobalRegistry *GR, MachineIRBuilder MIB)
 
static std::pair< Register, unsigned > createNewIdReg (Register ValReg, unsigned Opcode, MachineRegisterInfo &MRI, const SPIRVGlobalRegistry &GR)
 
static void processInstr (MachineInstr &MI, MachineIRBuilder &MIB, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR)
 
bool isTypeFoldingSupported (unsigned Opcode)
 
static void processInstrsWithTypeFolding (MachineFunction &MF, SPIRVGlobalRegistry *GR, MachineIRBuilder MIB)
 
static void processSwitches (MachineFunction &MF, SPIRVGlobalRegistry *GR, MachineIRBuilder MIB)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "spirv-prelegalizer"

Definition at line 27 of file SPIRVPreLegalizer.cpp.

Function Documentation

◆ createNewIdReg()

static std::pair<Register, unsigned> createNewIdReg ( Register  ValReg,
unsigned  Opcode,
MachineRegisterInfo MRI,
const SPIRVGlobalRegistry GR 
)
static

◆ foldConstantsIntoIntrinsics()

static void foldConstantsIntoIntrinsics ( MachineFunction MF)
static

◆ generateAssignInstrs()

static void generateAssignInstrs ( MachineFunction MF,
SPIRVGlobalRegistry GR,
MachineIRBuilder  MIB 
)
static

◆ insertAssignInstr()

static Register insertAssignInstr ( Register  Reg,
Type Ty,
SPIRVType SpirvTy,
SPIRVGlobalRegistry GR,
MachineIRBuilder MIB,
MachineRegisterInfo MRI 
)
static

◆ insertBitcasts()

static void insertBitcasts ( MachineFunction MF,
SPIRVGlobalRegistry GR,
MachineIRBuilder  MIB 
)
static

◆ isSpvIntrinsic()

static bool isSpvIntrinsic ( MachineInstr MI,
Intrinsic::ID  IntrinsicID 
)
static

◆ isTypeFoldingSupported()

bool isTypeFoldingSupported ( unsigned  Opcode)

◆ processInstr()

static void processInstr ( MachineInstr MI,
MachineIRBuilder MIB,
MachineRegisterInfo MRI,
SPIRVGlobalRegistry GR 
)
static

◆ processInstrsWithTypeFolding()

static void processInstrsWithTypeFolding ( MachineFunction MF,
SPIRVGlobalRegistry GR,
MachineIRBuilder  MIB 
)
static

◆ processSwitches()

static void processSwitches ( MachineFunction MF,
SPIRVGlobalRegistry GR,
MachineIRBuilder  MIB 
)
static

◆ propagateSPIRVType()

static SPIRVType* propagateSPIRVType ( MachineInstr MI,
SPIRVGlobalRegistry GR,
MachineRegisterInfo MRI,
MachineIRBuilder MIB 
)
static