#include "DXILOperation.inc"">

LLVM: lib/Target/DirectX/DXILOpBuilder.cpp File Reference (original) (raw)

#include "[DXILOpBuilder.h](DXILOpBuilder%5F8h%5Fsource.html)"
#include "[DXILConstants.h](DXILConstants%5F8h%5Fsource.html)"
#include "[llvm/IR/Module.h](IR%5F2Module%5F8h%5Fsource.html)"
#include "[llvm/Support/DXILABI.h](DXILABI%5F8h%5Fsource.html)"
#include "[llvm/Support/ErrorHandling.h](llvm%5F2Support%5F2ErrorHandling%5F8h%5Fsource.html)"
#include <optional>
#include "DXILOperation.inc"

Go to the source code of this file.

Namespaces
namespace llvm
This is an optimization pass for GlobalISel generic memory operations.
namespace llvm::dxil
Macros
#define DXIL_OP_OPERATION_TABLE
#define DXIL_OP_FUNCTION_TYPE(OpCode, RetType, ...)
#define DXIL_VERSION(MAJOR, MINOR)
#define DXIL_OP_ATTRIBUTES(OpCode, VersionMajor, VersionMinor, ...)
Functions
static const char * getOverloadTypeName (OverloadKind Kind)
static OverloadKind getOverloadKind (Type *Ty)
static std::string getTypeName (OverloadKind Kind, Type *Ty)
static std::string constructOverloadName (OverloadKind Kind, Type *Ty, const OpCodeProperty &Prop)
static std::string constructOverloadTypeName (OverloadKind Kind, StringRef TypeName)
static StructType * getOrCreateStructType (StringRef Name, ArrayRef< Type * > EltTys, LLVMContext &Ctx)
static StructType * getResRetType (Type *ElementTy)
static StructType * getCBufRetType (Type *ElementTy)
static StructType * getHandleType (LLVMContext &Ctx)
static StructType * getResBindType (LLVMContext &Context)
static StructType * getResPropsType (LLVMContext &Context)
static StructType * getSplitDoubleType (LLVMContext &Context)
static StructType * getBinaryWithCarryType (LLVMContext &Context)
static StructType * getDimensionsType (LLVMContext &Ctx)
static Type * getTypeFromOpParamType (OpParamType Kind, LLVMContext &Ctx, Type *OverloadTy)
static ShaderKind getShaderKindEnum (Triple::EnvironmentType EnvType)
static SmallVector< Type * > getArgTypesFromOpParamTypes (ArrayRef< dxil::OpParamType > Types, LLVMContext &Context, Type *OverloadTy)
static FunctionType * getDXILOpFunctionType (dxil::OpCode OpCode, LLVMContext &Context, Type *OverloadTy)
Construct DXIL function type.
template<typename T>
static std::optional< size_t > getPropIndex (ArrayRef< T > PropList, const VersionTuple DXILVer)
Get index of the property from PropList valid for the most recent DXIL version not greater than DXILVer.
static constexpr uint64_t computeSwitchEnum (dxil::OpCode OpCode, uint16_t VersionMajor, uint16_t VersionMinor)
static dxil::Attributes getDXILAttributes (dxil::OpCode OpCode, VersionTuple DXILVersion)
static void setDXILAttributes (CallInst *CI, dxil::OpCode OpCode, VersionTuple DXILVersion)
static Error llvm::dxil::makeOpError (dxil::OpCode OpCode, Twine Msg)

DXIL_OP_ATTRIBUTES

#define DXIL_OP_ATTRIBUTES ( OpCode,
VersionMajor,
VersionMinor,
... )

Value:

case computeSwitchEnum(OpCode, VersionMajor, VersionMinor): { \

Attributes |= Other; \

break; \

};

static constexpr uint64_t computeSwitchEnum(dxil::OpCode OpCode, uint16_t VersionMajor, uint16_t VersionMinor)

DXIL_OP_FUNCTION_TYPE

#define DXIL_OP_FUNCTION_TYPE ( OpCode,
RetType,
... )

Value:

return FunctionType::get( \

getTypeFromOpParamType(RetType, Context, OverloadTy), \

getArgTypesFromOpParamTypes({__VA_ARGS__}, Context, OverloadTy), \

false);

static Type * getTypeFromOpParamType(OpParamType Kind, LLVMContext &Ctx, Type *OverloadTy)

static SmallVector< Type * > getArgTypesFromOpParamTypes(ArrayRef< dxil::OpParamType > Types, LLVMContext &Context, Type *OverloadTy)

DXIL_OP_OPERATION_TABLE

#define DXIL_OP_OPERATION_TABLE

DXIL_VERSION

#define DXIL_VERSION ( MAJOR,
MINOR )

computeSwitchEnum()

constructOverloadName()

constructOverloadTypeName()

getArgTypesFromOpParamTypes()

getBinaryWithCarryType()

getCBufRetType()

getDimensionsType()

getDXILAttributes()

getDXILOpFunctionType()

getHandleType()

getOrCreateStructType()

getOverloadKind()

OverloadKind getOverloadKind ( Type * Ty) static

Definition at line 83 of file DXILOpBuilder.cpp.

References llvm::cast(), llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::IntegerType::getBitWidth(), getOverloadKind(), llvm::Type::HalfTyID, llvm::Type::IntegerTyID, llvm_unreachable, llvm::Type::PointerTyID, llvm::Type::StructTyID, T, and llvm::Type::VoidTyID.

Referenced by getCBufRetType(), getOverloadKind(), getResRetType(), and llvm::dxil::DXILOpBuilder::tryCreateOp().

getOverloadTypeName()

const char * getOverloadTypeName ( OverloadKind Kind) static

getPropIndex()

getResBindType()

getResPropsType()

getResRetType()

getShaderKindEnum()

Definition at line 334 of file DXILOpBuilder.cpp.

References llvm::Triple::Amplification, llvm::Triple::AnyHit, llvm::Triple::Callable, llvm::Triple::ClosestHit, llvm::Triple::Compute, llvm::Triple::Domain, llvm::Triple::Geometry, llvm::Triple::Hull, llvm::Triple::Intersection, llvm::Triple::Library, llvm_unreachable, llvm::Triple::Mesh, llvm::Triple::Miss, llvm::Triple::Pixel, llvm::Triple::RayGeneration, and llvm::Triple::Vertex.

Referenced by llvm::dxil::DXILOpBuilder::tryCreateOp().

getSplitDoubleType()

getTypeFromOpParamType()

Definition at line 270 of file DXILOpBuilder.cpp.

References getBinaryWithCarryType(), getCBufRetType(), getDimensionsType(), llvm::Type::getDoubleTy(), llvm::Type::getFloatTy(), llvm::Type::getHalfTy(), getHandleType(), llvm::Type::getInt16Ty(), llvm::Type::getInt1Ty(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::Type::getInt8Ty(), getResBindType(), getResPropsType(), getResRetType(), getSplitDoubleType(), llvm::Type::getVoidTy(), and llvm_unreachable.

Referenced by getArgTypesFromOpParamTypes().

getTypeName()

setDXILAttributes()

DXILOpNamePrefix