clang 22.0.0git
|
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CGHLSLRuntime.h"
Classes | |
struct | SemanticInfo |
Public Member Functions | |
GENERATE_HLSL_INTRINSIC_FUNCTION (FlattenedThreadIdInGroup, flattened_thread_id_in_group) GENERATE_HLSL_INTRINSIC_FUNCTION(CreateResourceGetPointer | |
resource_getpointer | GENERATE_HLSL_INTRINSIC_FUNCTION (CreateHandleFromBinding, resource_handlefrombinding) GENERATE_HLSL_INTRINSIC_FUNCTION(CreateHandleFromImplicitBinding |
resource_getpointer resource_handlefromimplicitbinding GENERATE_HLSL_INTRINSIC_FUNCTION(GroupMemoryBarrierWithGroupSync, group_memory_barrier_with_group_sync) protected void | collectInputSemantic (llvm::IRBuilder<> &B, const DeclaratorDecl *D, llvm::Type *Type, SmallVectorImpl< llvm::Value * > &Inputs) |
llvm::Value * | emitSystemSemanticLoad (llvm::IRBuilder<> &B, llvm::Type *Type, const clang::DeclaratorDecl *Decl, SemanticInfo &ActiveSemantic) |
llvm::Value * | handleScalarSemanticLoad (llvm::IRBuilder<> &B, llvm::Type *Type, const clang::DeclaratorDecl *Decl, SemanticInfo &ActiveSemantic) |
llvm::Value * | handleSemanticLoad (llvm::IRBuilder<> &B, llvm::Type *Type, const clang::DeclaratorDecl *Decl, SemanticInfo &ActiveSemantic) |
CGHLSLRuntime (CodeGenModule &CGM) | |
virtual | ~CGHLSLRuntime () |
llvm::Type * | convertHLSLSpecificType (const Type *T, SmallVector< int32_t > *Packoffsets=nullptr) |
void | generateGlobalCtorDtorCalls () |
void | addBuffer (const HLSLBufferDecl *D) |
void | addRootSignature (const HLSLRootSignatureDecl *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) |
llvm::Instruction * | getConvergenceToken (llvm::BasicBlock &BB) |
llvm::TargetExtType * | getHLSLBufferLayoutType (const RecordType *LayoutStructTy) |
void | addHLSLBufferLayoutType (const RecordType *LayoutStructTy, llvm::TargetExtType *LayoutTy) |
void | emitInitListOpaqueValues (CodeGenFunction &CGF, InitListExpr *E) |
std::optional< LValue > | emitResourceArraySubscriptExpr (const ArraySubscriptExpr *E, CodeGenFunction &CGF) |
Definition at line 84 of file CGHLSLRuntime.h.
|
inline |
Definition at line 165 of file CGHLSLRuntime.h.
|
inlinevirtual |
Definition at line 166 of file CGHLSLRuntime.h.
void CGHLSLRuntime::addBuffer | ( | const HLSLBufferDecl * | D | ) |
Definition at line 410 of file CGHLSLRuntime.cpp.
References clang::cast(), convertHLSLSpecificType(), createBufferHandleType(), fillPackoffsetLayout(), clang::Decl::getAttr(), clang::CodeGen::CodeGenModule::getModule(), clang::NamedDecl::getName(), clang::HLSLBufferDecl::hasValidPackoffset(), and clang::HLSLBufferDecl::isCBuffer().
Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
void CGHLSLRuntime::addHLSLBufferLayoutType | ( | const RecordType * | LayoutStructTy, |
llvm::TargetExtType * | LayoutTy ) |
Definition at line 473 of file CGHLSLRuntime.cpp.
References getHLSLBufferLayoutType().
void CGHLSLRuntime::addRootSignature | ( | const HLSLRootSignatureDecl * | D | ) |
Definition at line 452 of file CGHLSLRuntime.cpp.
References clang::CodeGen::CodeGenModule::getModule(), clang::HLSLRootSignatureDecl::getRootElements(), clang::HLSLRootSignatureDecl::getVersion(), and clang::T.
Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
resource_getpointer resource_handlefromimplicitbinding GENERATE_HLSL_INTRINSIC_FUNCTION(GroupMemoryBarrierWithGroupSync, group_memory_barrier_with_group_sync) protected void clang::CodeGen::CGHLSLRuntime::collectInputSemantic | ( | llvm::IRBuilder<> & | B, |
const DeclaratorDecl * | D, | ||
llvm::Type * | Type, | ||
SmallVectorImpl< llvm::Value * > & | Inputs ) |
References collectInputSemantic(), and clang::CodeGen::Type.
Referenced by collectInputSemantic().
llvm::Type * CGHLSLRuntime::convertHLSLSpecificType | ( | const Type * | T, |
SmallVector< int32_t > * | Packoffsets = nullptr ) |
Definition at line 264 of file CGHLSLRuntime.cpp.
References clang::CodeGen::TargetCodeGenInfo::getHLSLType(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::T, and clang::CodeGen::Type.
Referenced by addBuffer().
void CGHLSLRuntime::emitEntryFunction | ( | const FunctionDecl * | FD, |
llvm::Function * | Fn ) |
Definition at line 643 of file CGHLSLRuntime.cpp.
References clang::Function, clang::Decl::getAttrs(), clang::CodeGen::CodeGenModule::getModule(), clang::NamedDecl::getName(), clang::FunctionDecl::getParamDecl(), handleSemanticLoad(), setHLSLEntryAttributes(), and clang::CodeGen::CodeGenModule::shouldEmitConvergenceTokens().
void CGHLSLRuntime::emitInitListOpaqueValues | ( | CodeGenFunction & | CGF, |
InitListExpr * | E ) |
std::optional< LValue > CGHLSLRuntime::emitResourceArraySubscriptExpr | ( | const ArraySubscriptExpr * | E, |
CodeGenFunction & | CGF ) |
Definition at line 923 of file CGHLSLRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::cast(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::Ctor_Complete, clang::CodeGen::Decl, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitLifetimeStart(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::CodeGenFunction::getAsNaturalPointerTo(), clang::Decl::getASTContext(), clang::Decl::getAttr(), clang::ArraySubscriptExpr::getBase(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getConstantArrayElementCount(), clang::ArraySubscriptExpr::getExprLoc(), clang::ArraySubscriptExpr::getIdx(), clang::NamedDecl::getName(), clang::Type::getPointeeType(), clang::CodeGen::RawAddress::getPointer(), clang::CXXMethodDecl::getThisType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::VarDecl::hasGlobalStorage(), clang::Expr::IgnoreParenImpCasts(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::Type::isArrayType(), clang::Type::isHLSLResourceRecord(), clang::Type::isHLSLResourceRecordArray(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::CodeGen::NormalEHLifetimeMarker, clang::CodeGen::CodeGenFunction::pushFullExprCleanup(), and clang::CodeGen::Type.
llvm::Value * CGHLSLRuntime::emitSystemSemanticLoad | ( | llvm::IRBuilder<> & | B, |
llvm::Type * | Type, | ||
const clang::DeclaratorDecl * | Decl, | ||
SemanticInfo & | ActiveSemantic ) |
Definition at line 570 of file CGHLSLRuntime.cpp.
References buildVectorInput(), createSPIRVBuiltinLoad(), clang::CodeGen::Decl, clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getTriple(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::isa(), clang::CodeGen::CGHLSLRuntime::SemanticInfo::Semantic, and clang::CodeGen::Type.
Referenced by handleScalarSemanticLoad().
void CGHLSLRuntime::finishCodeGen | ( | ) |
Definition at line 480 of file CGHLSLRuntime.cpp.
References generateGlobalCtorDtorCalls(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTargetOpts(), and clang::T.
Referenced by clang::CodeGen::CodeGenModule::Release().
resource_getpointer clang::CodeGen::CGHLSLRuntime::GENERATE_HLSL_INTRINSIC_FUNCTION | ( | CreateHandleFromBinding | , |
resource_handlefrombinding | ) |
References GENERATE_HLSL_INTRINSIC_FUNCTION().
clang::CodeGen::CGHLSLRuntime::GENERATE_HLSL_INTRINSIC_FUNCTION | ( | FlattenedThreadIdInGroup | , |
flattened_thread_id_in_group | ) |
References GENERATE_HLSL_INTRINSIC_FUNCTION(), isinf(), normalize(), radians(), rsqrt(), sign(), and step().
Referenced by GENERATE_HLSL_INTRINSIC_FUNCTION(), and GENERATE_HLSL_INTRINSIC_FUNCTION().
void CGHLSLRuntime::generateGlobalCtorDtorCalls | ( | ) |
Definition at line 733 of file CGHLSLRuntime.cpp.
References gatherFunctions(), getConvergenceToken(), clang::CodeGen::CodeGenModule::getModule(), and clang::T.
Referenced by finishCodeGen().
llvm::Instruction * CGHLSLRuntime::getConvergenceToken | ( | llvm::BasicBlock & | BB | ) |
Definition at line 862 of file CGHLSLRuntime.cpp.
References clang::CodeGen::CodeGenModule::shouldEmitConvergenceTokens().
Referenced by generateGlobalCtorDtorCalls().
llvm::TargetExtType * CGHLSLRuntime::getHLSLBufferLayoutType | ( | const RecordType * | LayoutStructTy | ) |
Definition at line 466 of file CGHLSLRuntime.cpp.
Referenced by addHLSLBufferLayoutType().
void CGHLSLRuntime::handleGlobalVarDefinition | ( | const VarDecl * | VD, |
llvm::GlobalVariable * | Var ) |
Definition at line 856 of file CGHLSLRuntime.cpp.
References addSPIRVBuiltinDecoration(), and clang::Decl::getAttr().
llvm::Value * CGHLSLRuntime::handleScalarSemanticLoad | ( | llvm::IRBuilder<> & | B, |
llvm::Type * | Type, | ||
const clang::DeclaratorDecl * | Decl, | ||
SemanticInfo & | ActiveSemantic ) |
Definition at line 618 of file CGHLSLRuntime.cpp.
References clang::CodeGen::Decl, emitSystemSemanticLoad(), clang::CodeGen::CodeGenModule::getDiags(), clang::HLSLSemanticAttr::getSemanticIndex(), clang::CodeGen::CGHLSLRuntime::SemanticInfo::Index, clang::DiagnosticsEngine::Report(), clang::CodeGen::CGHLSLRuntime::SemanticInfo::Semantic, and clang::CodeGen::Type.
Referenced by handleSemanticLoad().
llvm::Value * CGHLSLRuntime::handleSemanticLoad | ( | llvm::IRBuilder<> & | B, |
llvm::Type * | Type, | ||
const clang::DeclaratorDecl * | Decl, | ||
SemanticInfo & | ActiveSemantic ) |
Definition at line 636 of file CGHLSLRuntime.cpp.
References clang::CodeGen::Decl, handleScalarSemanticLoad(), and clang::CodeGen::Type.
Referenced by emitEntryFunction().
void clang::CodeGen::CGHLSLRuntime::setHLSLEntryAttributes | ( | const FunctionDecl * | FD, |
llvm::Function * | Fn ) |
Definition at line 501 of file CGHLSLRuntime.cpp.
References clang::Decl::getAttr(), and clang::CodeGen::CodeGenModule::getCodeGenOpts().
Referenced by emitEntryFunction().
void clang::CodeGen::CGHLSLRuntime::setHLSLFunctionAttributes | ( | const FunctionDecl * | FD, |
llvm::Function * | Fn ) |