LLVM  16.0.0git
Classes | Namespaces | Macros | Functions | Variables
DXILOpBuilder.cpp File Reference
#include "DXILOpBuilder.h"
#include "DXILConstants.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/DXILOperationCommon.h"
#include "llvm/Support/ErrorHandling.h"
#include "DXILOperation.inc"
Include dependency graph for DXILOpBuilder.cpp:

Go to the source code of this file.

Classes

struct  OpCodeProperty
 

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
 llvm::dxil
 

Macros

#define DXIL_OP_OPERATION_TABLE
 

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 StructTypegetOrCreateStructType (StringRef Name, ArrayRef< Type * > EltTys, LLVMContext &Ctx)
 
static StructTypegetResRetType (Type *OverloadTy, LLVMContext &Ctx)
 
static StructTypegetHandleType (LLVMContext &Ctx)
 
static TypegetTypeFromParameterKind (ParameterKind Kind, Type *OverloadTy)
 
static FunctionTypegetDXILOpFunctionType (const OpCodeProperty *Prop, Type *OverloadTy)
 
static FunctionCallee getOrCreateDXILOpFunction (dxil::OpCode DXILOp, Type *OverloadTy, Module &M)
 

Variables

constexpr StringLiteral DXILOpNamePrefix = "dx.op."
 

Macro Definition Documentation

◆ DXIL_OP_OPERATION_TABLE

#define DXIL_OP_OPERATION_TABLE

Definition at line 144 of file DXILOpBuilder.cpp.

Function Documentation

◆ constructOverloadName()

static std::string constructOverloadName ( OverloadKind  Kind,
Type Ty,
const OpCodeProperty Prop 
)
static

Definition at line 148 of file DXILOpBuilder.cpp.

References DXILOpNamePrefix, and llvm::getTypeName().

Referenced by getOrCreateDXILOpFunction().

◆ constructOverloadTypeName()

static std::string constructOverloadTypeName ( OverloadKind  Kind,
StringRef  TypeName 
)
static

◆ getDXILOpFunctionType()

static FunctionType* getDXILOpFunctionType ( const OpCodeProperty Prop,
Type OverloadTy 
)
static

◆ getHandleType()

static StructType* getHandleType ( LLVMContext Ctx)
static

Definition at line 185 of file DXILOpBuilder.cpp.

References llvm::Type::getInt8PtrTy(), and getOrCreateStructType().

Referenced by getTypeFromParameterKind().

◆ getOrCreateDXILOpFunction()

static FunctionCallee getOrCreateDXILOpFunction ( dxil::OpCode  DXILOp,
Type OverloadTy,
Module M 
)
static

◆ getOrCreateStructType()

static StructType* getOrCreateStructType ( StringRef  Name,
ArrayRef< Type * >  EltTys,
LLVMContext Ctx 
)
static

◆ getOverloadKind()

static OverloadKind getOverloadKind ( Type Ty)
static

◆ getOverloadTypeName()

static const char* getOverloadTypeName ( OverloadKind  Kind)
static

Definition at line 42 of file DXILOpBuilder.cpp.

References llvm_unreachable.

Referenced by constructOverloadTypeName(), and getTypeName().

◆ getResRetType()

static StructType* getResRetType ( Type OverloadTy,
LLVMContext Ctx 
)
static

◆ getTypeFromParameterKind()

static Type* getTypeFromParameterKind ( ParameterKind  Kind,
Type OverloadTy 
)
static

◆ getTypeName()

static std::string getTypeName ( OverloadKind  Kind,
Type Ty 
)
static

Variable Documentation

◆ DXILOpNamePrefix

constexpr StringLiteral DXILOpNamePrefix = "dx.op."
constexpr

Definition at line 22 of file DXILOpBuilder.cpp.

Referenced by constructOverloadName().