|
LLVM 22.0.0git
|
#include "Target/DirectX/DXILOpBuilder.h"
Public Member Functions | |
| DXILOpBuilder (Module &M) | |
| IRBuilder & | getIRB () |
| CallInst * | createOp (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. | |
| StructType * | getResRetType (Type *ElementTy) |
| Get a dx.types.ResRet type with the given element type. | |
| StructType * | getCBufRetType (Type *ElementTy) |
| Get a dx.types.CBufRet type with the given element type. | |
| StructType * | getHandleType () |
| Get the dx.types.Handle type. | |
| Constant * | getResBind (uint32_t LowerBound, uint32_t UpperBound, uint32_t SpaceID, dxil::ResourceClass RC) |
| Get a constant dx.types.ResBind value. | |
| Constant * | getResProps (uint32_t Word0, uint32_t Word1) |
| Get a constant dx.types.ResourceProperties value. | |
Static Public Member Functions | |
| static const char * | getOpCodeName (dxil::OpCode DXILOp) |
| Return the name of the given opcode. | |
Definition at line 33 of file DXILOpBuilder.h.
| llvm::dxil::DXILOpBuilder::DXILOpBuilder | ( | Module & | M | ) |
Definition at line 483 of file DXILOpBuilder.cpp.
References llvm::reportFatalUsageError(), and llvm::Triple::UnknownEnvironment.
| 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 578 of file DXILOpBuilder.cpp.
References llvm_unreachable, and tryCreateOp().
| StructType * llvm::dxil::DXILOpBuilder::getCBufRetType | ( | Type * | ElementTy | ) |
Get a dx.types.CBufRet type with the given element type.
Definition at line 590 of file DXILOpBuilder.cpp.
| StructType * llvm::dxil::DXILOpBuilder::getHandleType | ( | ) |
Get the dx.types.Handle type.
Definition at line 594 of file DXILOpBuilder.cpp.
|
inline |
Definition at line 37 of file DXILOpBuilder.h.
|
static |
Return the name of the given opcode.
Definition at line 617 of file DXILOpBuilder.cpp.
| 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 598 of file DXILOpBuilder.cpp.
References llvm::ConstantStruct::get(), llvm::Type::getInt8Ty(), getResBindType(), and llvm::Int32Ty.
Get a constant dx.types.ResourceProperties value.
Definition at line 610 of file DXILOpBuilder.cpp.
References llvm::ConstantStruct::get(), getResPropsType(), and llvm::Int32Ty.
| StructType * llvm::dxil::DXILOpBuilder::getResRetType | ( | Type * | ElementTy | ) |
Get a dx.types.ResRet type with the given element type.
Definition at line 586 of file DXILOpBuilder.cpp.
| Expected< CallInst * > llvm::dxil::DXILOpBuilder::tryCreateOp | ( | dxil::OpCode | Op, |
| ArrayRef< Value * > | Args, | ||
| const Twine & | Name = "", | ||
| Type * | RetTy = nullptr ) |
Try to create a call instruction for the given DXIL op.
Fails if the overload is invalid.
Definition at line 501 of file DXILOpBuilder.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::ArrayRef(), constructOverloadName(), getDXILOpFunctionType(), getOverloadKind(), getPropIndex(), getShaderKindEnum(), llvm::dxil::makeOpError(), OpCodeProperty::OverloadParamIndex, OpCodeProperty::Overloads, llvm::SmallVectorTemplateBase< T, bool >::push_back(), setDXILAttributes(), OpCodeProperty::Stages, and llvm::to_underlying().
Referenced by createOp().