LLVM 22.0.0git
llvm::dxil::DXILOpBuilder Class Reference

#include "Target/DirectX/DXILOpBuilder.h"

Public Member Functions

 DXILOpBuilder (Module &M)
IRBuildergetIRB ()
CallInstcreateOp (dxil::OpCode Op, ArrayRef< Value * > Args, const Twine &Name="", Type *RetTy=nullptr)
 Create a call instruction for the given DXIL op.
Expected< CallInst * > tryCreateOp (dxil::OpCode Op, ArrayRef< Value * > Args, const Twine &Name="", Type *RetTy=nullptr)
 Try to create a call instruction for the given DXIL op.
StructTypegetResRetType (Type *ElementTy)
 Get a dx.types.ResRet type with the given element type.
StructTypegetCBufRetType (Type *ElementTy)
 Get a dx.types.CBufRet type with the given element type.
StructTypegetHandleType ()
 Get the dx.types.Handle type.
ConstantgetResBind (uint32_t LowerBound, uint32_t UpperBound, uint32_t SpaceID, dxil::ResourceClass RC)
 Get a constant dx.types.ResBind value.
ConstantgetResProps (uint32_t Word0, uint32_t Word1)
 Get a constant dx.types.ResourceProperties value.

Static Public Member Functions

static const chargetOpCodeName (dxil::OpCode DXILOp)
 Return the name of the given opcode.

Detailed Description

Definition at line 33 of file DXILOpBuilder.h.

Constructor & Destructor Documentation

◆ DXILOpBuilder()

llvm::dxil::DXILOpBuilder::DXILOpBuilder ( Module & M)

Member Function Documentation

◆ createOp()

CallInst * llvm::dxil::DXILOpBuilder::createOp ( dxil::OpCode Op,
ArrayRef< Value * > Args,
const Twine & Name = "",
Type * RetTy = nullptr )

Create a call instruction for the given DXIL op.

The arguments must be valid for an overload of the operation.

Definition at line 570 of file DXILOpBuilder.cpp.

References llvm_unreachable, and tryCreateOp().

◆ getCBufRetType()

StructType * llvm::dxil::DXILOpBuilder::getCBufRetType ( Type * ElementTy)

Get a dx.types.CBufRet type with the given element type.

Definition at line 582 of file DXILOpBuilder.cpp.

◆ getHandleType()

StructType * llvm::dxil::DXILOpBuilder::getHandleType ( )

Get the dx.types.Handle type.

Definition at line 586 of file DXILOpBuilder.cpp.

◆ getIRB()

IRBuilder & llvm::dxil::DXILOpBuilder::getIRB ( )
inline

Definition at line 37 of file DXILOpBuilder.h.

◆ getOpCodeName()

const char * llvm::dxil::DXILOpBuilder::getOpCodeName ( dxil::OpCode DXILOp)
static

Return the name of the given opcode.

Definition at line 609 of file DXILOpBuilder.cpp.

◆ getResBind()

Constant * llvm::dxil::DXILOpBuilder::getResBind ( uint32_t LowerBound,
uint32_t UpperBound,
uint32_t SpaceID,
dxil::ResourceClass RC )

Get a constant dx.types.ResBind value.

Definition at line 590 of file DXILOpBuilder.cpp.

References llvm::ConstantStruct::get(), llvm::Type::getInt8Ty(), getResBindType(), and llvm::Int32Ty.

◆ getResProps()

Constant * llvm::dxil::DXILOpBuilder::getResProps ( uint32_t Word0,
uint32_t Word1 )

Get a constant dx.types.ResourceProperties value.

Definition at line 602 of file DXILOpBuilder.cpp.

References llvm::ConstantStruct::get(), getResPropsType(), and llvm::Int32Ty.

◆ getResRetType()

StructType * llvm::dxil::DXILOpBuilder::getResRetType ( Type * ElementTy)

Get a dx.types.ResRet type with the given element type.

Definition at line 578 of file DXILOpBuilder.cpp.

◆ tryCreateOp()


The documentation for this class was generated from the following files: