clang 20.0.0git
|
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CGHLSLRuntime.h"
Classes | |
struct | Buffer |
struct | BufferResBinding |
Public Member Functions | |
GENERATE_HLSL_INTRINSIC_FUNCTION (CreateHandleFromBinding, resource_handlefrombinding) GENERATE_HLSL_INTRINSIC_FUNCTION(GroupMemoryBarrierWithGroupSync | |
CGHLSLRuntime (CodeGenModule &CGM) | |
virtual | ~CGHLSLRuntime () |
llvm::Type * | convertHLSLSpecificType (const Type *T) |
void | annotateHLSLResource (const VarDecl *D, llvm::GlobalVariable *GV) |
void | generateGlobalCtorDtorCalls () |
void | addBuffer (const HLSLBufferDecl *D) |
void | finishCodeGen () |
void | setHLSLEntryAttributes (const FunctionDecl *FD, llvm::Function *Fn) |
void | emitEntryFunction (const FunctionDecl *FD, llvm::Function *Fn) |
void | setHLSLFunctionAttributes (const FunctionDecl *FD, llvm::Function *Fn) |
void | handleGlobalVarDefinition (const VarDecl *VD, llvm::GlobalVariable *Var) |
bool | needsResourceBindingInitFn () |
llvm::Function * | createResourceBindingInitFn () |
llvm::Instruction * | getConvergenceToken (llvm::BasicBlock &BB) |
Protected Member Functions | |
llvm::Value * | emitInputSemantic (llvm::IRBuilder<> &B, const ParmVarDecl &D, llvm::Type *Ty) |
Protected Attributes | |
CodeGenModule & | CGM |
Definition at line 69 of file CGHLSLRuntime.h.
|
inline |
Definition at line 142 of file CGHLSLRuntime.h.
|
inlinevirtual |
Definition at line 143 of file CGHLSLRuntime.h.
void CGHLSLRuntime::addBuffer | ( | const HLSLBufferDecl * | D | ) |
Definition at line 176 of file CGHLSLRuntime.cpp.
References D.
Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
void CGHLSLRuntime::annotateHLSLResource | ( | const VarDecl * | D, |
llvm::GlobalVariable * | GV | ||
) |
Definition at line 292 of file CGHLSLRuntime.cpp.
References calculateElementType(), CGM, D, clang::Type::getAsCXXRecordDecl(), clang::Decl::getAttr(), and clang::CodeGen::CodeGenModule::getContext().
llvm::Type * CGHLSLRuntime::convertHLSLSpecificType | ( | const Type * | T | ) |
Definition at line 124 of file CGHLSLRuntime.cpp.
References CGM, clang::CodeGen::TargetCodeGenInfo::getHLSLType(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::Type::isHLSLSpecificType(), and clang::T.
Referenced by clang::CodeGen::CodeGenTypes::ConvertType().
llvm::Function * CGHLSLRuntime::createResourceBindingInitFn | ( | ) |
Definition at line 561 of file CGHLSLRuntime.cpp.
References CGM, clang::HLSLAttributedResourceType::findHandleTypeOnResource(), clang::CodeGen::TargetCodeGenInfo::getHLSLType(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::CodeGen::CodeGenTypeCache::IntTy, needsResourceBindingInitFn(), Range, and clang::CodeGen::CodeGenTypeCache::VoidTy.
void CGHLSLRuntime::emitEntryFunction | ( | const FunctionDecl * | FD, |
llvm::Function * | Fn | ||
) |
Definition at line 405 of file CGHLSLRuntime.cpp.
References CGM, emitInputSemantic(), clang::Function, clang::CodeGen::CodeGenModule::getModule(), clang::NamedDecl::getName(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), setHLSLEntryAttributes(), and clang::CodeGen::CodeGenModule::shouldEmitConvergenceTokens().
|
protected |
Definition at line 378 of file CGHLSLRuntime.cpp.
References buildVectorInput(), CGM, D, clang::CodeGen::CodeGenModule::getIntrinsic(), clang::Decl::hasAttr(), and clang::Decl::hasAttrs().
Referenced by emitEntryFunction().
void CGHLSLRuntime::finishCodeGen | ( | ) |
Definition at line 181 of file CGHLSLRuntime.cpp.
References clang::CodeGen::CGHLSLRuntime::Buffer::Binding, CGM, generateGlobalCtorDtorCalls(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTargetOpts(), clang::CodeGen::CGHLSLRuntime::Buffer::IsCBuffer, and clang::T.
Referenced by clang::CodeGen::CodeGenModule::Release().
clang::CodeGen::CGHLSLRuntime::GENERATE_HLSL_INTRINSIC_FUNCTION | ( | CreateHandleFromBinding | , |
resource_handlefrombinding | |||
) |
void CGHLSLRuntime::generateGlobalCtorDtorCalls | ( | ) |
Definition at line 493 of file CGHLSLRuntime.cpp.
References CGM, gatherFunctions(), getConvergenceToken(), clang::CodeGen::CodeGenModule::getModule(), and clang::T.
Referenced by finishCodeGen().
llvm::Instruction * CGHLSLRuntime::getConvergenceToken | ( | llvm::BasicBlock & | BB | ) |
Definition at line 624 of file CGHLSLRuntime.cpp.
References CGM, E, and clang::CodeGen::CodeGenModule::shouldEmitConvergenceTokens().
Referenced by generateGlobalCtorDtorCalls().
void CGHLSLRuntime::handleGlobalVarDefinition | ( | const VarDecl * | VD, |
llvm::GlobalVariable * | Var | ||
) |
Definition at line 539 of file CGHLSLRuntime.cpp.
References clang::HLSLAttributedResourceType::findHandleTypeOnResource(), clang::Decl::getAttr(), clang::ValueDecl::getType(), and clang::QualType::getTypePtr().
bool CGHLSLRuntime::needsResourceBindingInitFn | ( | ) |
Definition at line 557 of file CGHLSLRuntime.cpp.
Referenced by createResourceBindingInitFn().
void clang::CodeGen::CGHLSLRuntime::setHLSLEntryAttributes | ( | const FunctionDecl * | FD, |
llvm::Function * | Fn | ||
) |
Definition at line 342 of file CGHLSLRuntime.cpp.
References clang::Decl::getAttr().
Referenced by emitEntryFunction().
void CGHLSLRuntime::setHLSLFunctionAttributes | ( | const FunctionDecl * | FD, |
llvm::Function * | Fn | ||
) |
Definition at line 458 of file CGHLSLRuntime.cpp.
References clang::Decl::isInExportDeclContext().
|
protected |
Definition at line 136 of file CGHLSLRuntime.h.
Referenced by annotateHLSLResource(), convertHLSLSpecificType(), createResourceBindingInitFn(), emitEntryFunction(), emitInputSemantic(), finishCodeGen(), generateGlobalCtorDtorCalls(), and getConvergenceToken().