15#include "llvm/IR/IntrinsicsSPIRV.h"
17#define DEBUG_TYPE "spirv-lower"
53 unsigned Intrinsic)
const {
54 unsigned AlignIdx = 3;
56 case Intrinsic::spv_load:
59 case Intrinsic::spv_store: {
60 if (
I.getNumOperands() >= AlignIdx + 1) {
61 auto *AlignOp = cast<ConstantInt>(
I.getOperand(AlignIdx));
62 Info.align =
Align(AlignOp->getZExtValue());
65 cast<ConstantInt>(
I.getOperand(AlignIdx - 1))->getZExtValue());
66 Info.memVT = MVT::i64;
Analysis containing CSE Info
This class represents a function call, abstracting a target machine's calling convention.
This is an important class for using LLVM in a threaded context.
Flags
Flags values. These may be or'd together.
unsigned getNumRegistersForCallingConv(LLVMContext &Context, CallingConv::ID CC, EVT VT) const override
Certain targets require unusual breakdowns of certain types.
MVT getRegisterTypeForCallingConv(LLVMContext &Context, CallingConv::ID CC, EVT VT) const override
Certain combinations of ABIs, Targets and features require that types are legal for some operations a...
bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I, MachineFunction &MF, unsigned Intrinsic) const override
Given an intrinsic, checks if on the target the intrinsic will need to map to a MemIntrinsicNode (tou...
virtual unsigned getNumRegisters(LLVMContext &Context, EVT VT, std::optional< MVT > RegisterVT=std::nullopt) const
Return the number of registers that this ValueType will eventually require.
MVT getRegisterType(MVT VT) const
Return the type of registers that this ValueType will eventually require.
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.
TypeSize getSizeInBits() const
Return the size of the specified value type in bits.
bool isVector() const
Return true if this is a vector value type.
EVT getVectorElementType() const
Given a vector type, return the type of each element.
unsigned getVectorNumElements() const
Given a vector type, return the number of elements it contains.
bool isInteger() const
Return true if this is an integer or a vector integer type.