LLVM 19.0.0git
Functions | Variables
SPIRVLegalizerInfo.cpp File Reference
#include "SPIRVLegalizerInfo.h"
#include "SPIRV.h"
#include "SPIRVGlobalRegistry.h"
#include "SPIRVSubtarget.h"
#include "llvm/CodeGen/GlobalISel/LegalizerHelper.h"
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetOpcodes.h"

Go to the source code of this file.

Functions

bool isTypeFoldingSupported (unsigned Opcode)
 
static Register convertPtrToInt (Register Reg, LLT ConvTy, SPIRVType *SpirvType, LegalizerHelper &Helper, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR)
 

Variables

static const std::set< unsignedTypeFoldingSupportingOpcs
 

Function Documentation

◆ convertPtrToInt()

static Register convertPtrToInt ( Register  Reg,
LLT  ConvTy,
SPIRVType SpirvType,
LegalizerHelper Helper,
MachineRegisterInfo MRI,
SPIRVGlobalRegistry GR 
)
static

◆ isTypeFoldingSupported()

bool isTypeFoldingSupported ( unsigned  Opcode)

Variable Documentation

◆ TypeFoldingSupportingOpcs

const std::set<unsigned> TypeFoldingSupportingOpcs
static
Initial value:
= {
TargetOpcode::G_ADD,
TargetOpcode::G_FADD,
TargetOpcode::G_SUB,
TargetOpcode::G_FSUB,
TargetOpcode::G_MUL,
TargetOpcode::G_FMUL,
TargetOpcode::G_SDIV,
TargetOpcode::G_UDIV,
TargetOpcode::G_FDIV,
TargetOpcode::G_SREM,
TargetOpcode::G_UREM,
TargetOpcode::G_FREM,
TargetOpcode::G_FNEG,
TargetOpcode::G_CONSTANT,
TargetOpcode::G_FCONSTANT,
TargetOpcode::G_AND,
TargetOpcode::G_OR,
TargetOpcode::G_XOR,
TargetOpcode::G_SHL,
TargetOpcode::G_ASHR,
TargetOpcode::G_LSHR,
TargetOpcode::G_SELECT,
TargetOpcode::G_EXTRACT_VECTOR_ELT,
}

Definition at line 27 of file SPIRVLegalizerInfo.cpp.

Referenced by isTypeFoldingSupported(), and llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo().