|
clang 22.0.0git
|
#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CGHLSLRuntime.h"
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 (NonUniformResourceIndex, resource_nonuniformindex) GENERATE_HLSL_INTRINSIC_FUNCTION(GroupMemoryBarrierWithGroupSync |
| CGHLSLRuntime (CodeGenModule &CGM) | |
| virtual | ~CGHLSLRuntime () |
| llvm::Type * | convertHLSLSpecificType (const Type *T, const CGHLSLOffsetInfo &OffsetInfo) |
| llvm::Type * | convertHLSLSpecificType (const Type *T) |
| 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::StructType * | getHLSLBufferLayoutType (const RecordType *LayoutStructTy) |
| void | addHLSLBufferLayoutType (const RecordType *LayoutStructTy, llvm::StructType *LayoutTy) |
| void | emitInitListOpaqueValues (CodeGenFunction &CGF, InitListExpr *E) |
| std::optional< LValue > | emitResourceArraySubscriptExpr (const ArraySubscriptExpr *E, CodeGenFunction &CGF) |
| std::optional< LValue > | emitBufferArraySubscriptExpr (const ArraySubscriptExpr *E, CodeGenFunction &CGF, llvm::function_ref< llvm::Value *(bool Promote)> EmitIdxAfterBase) |
| bool | emitBufferCopy (CodeGenFunction &CGF, Address DestPtr, Address SrcPtr, QualType CType) |
| LValue | emitBufferMemberExpr (CodeGenFunction &CGF, const MemberExpr *E) |
Protected Member Functions | |
| llvm::Value * | emitSystemSemanticLoad (llvm::IRBuilder<> &B, llvm::Type *Type, const clang::DeclaratorDecl *Decl, HLSLAppliedSemanticAttr *Semantic, std::optional< unsigned > Index) |
| void | emitSystemSemanticStore (llvm::IRBuilder<> &B, llvm::Value *Source, const clang::DeclaratorDecl *Decl, HLSLAppliedSemanticAttr *Semantic, std::optional< unsigned > Index) |
| llvm::Value * | handleScalarSemanticLoad (llvm::IRBuilder<> &B, const FunctionDecl *FD, llvm::Type *Type, const clang::DeclaratorDecl *Decl, HLSLAppliedSemanticAttr *Semantic) |
| void | handleScalarSemanticStore (llvm::IRBuilder<> &B, const FunctionDecl *FD, llvm::Value *Source, const clang::DeclaratorDecl *Decl, HLSLAppliedSemanticAttr *Semantic) |
| std::pair< llvm::Value *, specific_attr_iterator< HLSLAppliedSemanticAttr > > | handleStructSemanticLoad (llvm::IRBuilder<> &B, const FunctionDecl *FD, llvm::Type *Type, const clang::DeclaratorDecl *Decl, specific_attr_iterator< HLSLAppliedSemanticAttr > begin, specific_attr_iterator< HLSLAppliedSemanticAttr > end) |
| specific_attr_iterator< HLSLAppliedSemanticAttr > | handleStructSemanticStore (llvm::IRBuilder<> &B, const FunctionDecl *FD, llvm::Value *Source, const clang::DeclaratorDecl *Decl, specific_attr_iterator< HLSLAppliedSemanticAttr > AttrBegin, specific_attr_iterator< HLSLAppliedSemanticAttr > AttrEnd) |
| std::pair< llvm::Value *, specific_attr_iterator< HLSLAppliedSemanticAttr > > | handleSemanticLoad (llvm::IRBuilder<> &B, const FunctionDecl *FD, llvm::Type *Type, const clang::DeclaratorDecl *Decl, specific_attr_iterator< HLSLAppliedSemanticAttr > begin, specific_attr_iterator< HLSLAppliedSemanticAttr > end) |
| specific_attr_iterator< HLSLAppliedSemanticAttr > | handleSemanticStore (llvm::IRBuilder<> &B, const FunctionDecl *FD, llvm::Value *Source, const clang::DeclaratorDecl *Decl, specific_attr_iterator< HLSLAppliedSemanticAttr > AttrBegin, specific_attr_iterator< HLSLAppliedSemanticAttr > AttrEnd) |
Protected Attributes | |
| CodeGenModule & | CGM |
Definition at line 117 of file CGHLSLRuntime.h.
|
inline |
Definition at line 229 of file CGHLSLRuntime.h.
References CGHLSLRuntime(), and CGM.
Referenced by CGHLSLRuntime().
|
inlinevirtual |
Definition at line 230 of file CGHLSLRuntime.h.
| void CGHLSLRuntime::addBuffer | ( | const HLSLBufferDecl * | D | ) |
Definition at line 411 of file CGHLSLRuntime.cpp.
References CGM, convertHLSLSpecificType(), createBufferHandleType(), clang::CodeGen::CGHLSLOffsetInfo::fromDecl(), clang::NamedDecl::getName(), and clang::HLSLBufferDecl::isCBuffer().
Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
| void CGHLSLRuntime::addHLSLBufferLayoutType | ( | const RecordType * | LayoutStructTy, |
| llvm::StructType * | LayoutTy ) |
Definition at line 462 of file CGHLSLRuntime.cpp.
References getHLSLBufferLayoutType().
| void CGHLSLRuntime::addRootSignature | ( | const HLSLRootSignatureDecl * | D | ) |
Definition at line 441 of file CGHLSLRuntime.cpp.
References CGM, clang::HLSLRootSignatureDecl::getRootElements(), clang::HLSLRootSignatureDecl::getVersion(), and clang::T.
Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
|
inline |
Definition at line 234 of file CGHLSLRuntime.h.
References convertHLSLSpecificType(), clang::T, and clang::CodeGen::Type.
| llvm::Type * CGHLSLRuntime::convertHLSLSpecificType | ( | const Type * | T, |
| const CGHLSLOffsetInfo & | OffsetInfo ) |
Definition at line 266 of file CGHLSLRuntime.cpp.
References CGM, clang::T, and clang::CodeGen::Type.
Referenced by addBuffer(), and convertHLSLSpecificType().
| std::optional< LValue > CGHLSLRuntime::emitBufferArraySubscriptExpr | ( | const ArraySubscriptExpr * | E, |
| CodeGenFunction & | CGF, | ||
| llvm::function_ref< llvm::Value *(bool Promote)> | EmitIdxAfterBase ) |
Definition at line 1294 of file CGHLSLRuntime.cpp.
References clang::Addr, clang::CharUnits::alignTo(), clang::CodeGen::CodeGenFunction::Builder, CGM, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateGEP(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CharUnits::fromQuantity(), clang::ArraySubscriptExpr::getBase(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::KnownNonNull, clang::CodeGen::HLSLBufferLayoutBuilder::layOutType(), and clang::CodeGen::CodeGenFunction::MakeAddrLValue().
| bool CGHLSLRuntime::emitBufferCopy | ( | CodeGenFunction & | CGF, |
| Address | DestPtr, | ||
| Address | SrcPtr, | ||
| QualType | CType ) |
Definition at line 1482 of file CGHLSLRuntime.cpp.
| LValue CGHLSLRuntime::emitBufferMemberExpr | ( | CodeGenFunction & | CGF, |
| const MemberExpr * | E ) |
Definition at line 1487 of file CGHLSLRuntime.cpp.
References clang::Qualifiers::addCVRQualifiers(), clang::Addr, clang::CodeGen::CodeGenFunction::Builder, CGM, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::CodeGenFunction::EmitCheckedLValue(), clang::CharUnits::fromQuantity(), clang::Type::getAsCanonical(), clang::MemberExpr::getBase(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::MemberExpr::getMemberDecl(), clang::DeclContext::getParent(), clang::CodeGen::LValue::getQuals(), clang::Type::isStructureOrClassType(), clang::CodeGen::KnownNonNull, clang::CodeGen::HLSLBufferLayoutBuilder::layOutStruct(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::CodeGenFunction::TCK_MemberAccess, and clang::CodeGen::Type.
| void CGHLSLRuntime::emitEntryFunction | ( | const FunctionDecl * | FD, |
| llvm::Function * | Fn ) |
Definition at line 897 of file CGHLSLRuntime.cpp.
References CGM, clang::CodeGen::Decl, clang::Function, clang::Decl::getAttr(), clang::Decl::getAttrs(), clang::NamedDecl::getName(), clang::FunctionDecl::getParamDecl(), handleSemanticLoad(), handleSemanticStore(), clang::Result, setHLSLEntryAttributes(), clang::Decl::specific_attr_begin(), and clang::Decl::specific_attr_end().
| void CGHLSLRuntime::emitInitListOpaqueValues | ( | CodeGenFunction & | CGF, |
| InitListExpr * | E ) |
| std::optional< LValue > CGHLSLRuntime::emitResourceArraySubscriptExpr | ( | const ArraySubscriptExpr * | E, |
| CodeGenFunction & | CGF ) |
Definition at line 1197 of file CGHLSLRuntime.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::cast(), CGM, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::Decl, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::CodeGen::CodeGenFunction::EmitLifetimeStart(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::AggValueSlot::forAddr(), clang::Type::getAsCXXRecordDecl(), clang::Decl::getASTContext(), clang::ArraySubscriptExpr::getBase(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getConstantArrayElementCount(), clang::ArraySubscriptExpr::getExprLoc(), clang::ArraySubscriptExpr::getIdx(), clang::NamedDecl::getName(), clang::CodeGen::RawAddress::getPointer(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), clang::hlsl::ResourceBindingAttrs::hasBinding(), clang::VarDecl::hasGlobalStorage(), clang::Expr::IgnoreParenImpCasts(), clang::Type::isArrayType(), clang::Type::isHLSLResourceRecord(), clang::Type::isHLSLResourceRecordArray(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::CodeGen::NormalEHLifetimeMarker, clang::CodeGen::CodeGenFunction::pushFullExprCleanup(), and clang::CodeGen::Type.
|
protected |
Definition at line 695 of file CGHLSLRuntime.cpp.
References buildVectorInput(), CGM, createSPIRVBuiltinLoad(), clang::CodeGen::Decl, and clang::CodeGen::Type.
Referenced by handleScalarSemanticLoad().
|
protected |
Definition at line 766 of file CGHLSLRuntime.cpp.
References CGM, createSPIRVBuiltinStore(), and clang::CodeGen::Decl.
Referenced by handleScalarSemanticStore().
| void CGHLSLRuntime::finishCodeGen | ( | ) |
Definition at line 469 of file CGHLSLRuntime.cpp.
References CGM, generateGlobalCtorDtorCalls(), 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(), isnan(), normalize(), radians(), rsqrt(), sign(), and step().
Referenced by GENERATE_HLSL_INTRINSIC_FUNCTION(), GENERATE_HLSL_INTRINSIC_FUNCTION(), and GENERATE_HLSL_INTRINSIC_FUNCTION().
| resource_getpointer resource_handlefromimplicitbinding clang::CodeGen::CGHLSLRuntime::GENERATE_HLSL_INTRINSIC_FUNCTION | ( | NonUniformResourceIndex | , |
| resource_nonuniformindex | ) |
References GENERATE_HLSL_INTRINSIC_FUNCTION().
| void CGHLSLRuntime::generateGlobalCtorDtorCalls | ( | ) |
Definition at line 1022 of file CGHLSLRuntime.cpp.
References CGM, gatherFunctions(), getConvergenceToken(), and clang::T.
Referenced by finishCodeGen().
| llvm::Instruction * CGHLSLRuntime::getConvergenceToken | ( | llvm::BasicBlock & | BB | ) |
Definition at line 1136 of file CGHLSLRuntime.cpp.
References CGM.
Referenced by generateGlobalCtorDtorCalls().
| llvm::StructType * CGHLSLRuntime::getHLSLBufferLayoutType | ( | const RecordType * | LayoutStructTy | ) |
Definition at line 455 of file CGHLSLRuntime.cpp.
Referenced by addHLSLBufferLayoutType().
| void CGHLSLRuntime::handleGlobalVarDefinition | ( | const VarDecl * | VD, |
| llvm::GlobalVariable * | Var ) |
Definition at line 1130 of file CGHLSLRuntime.cpp.
References addSPIRVBuiltinDecoration(), and clang::Decl::getAttr().
|
protected |
Definition at line 790 of file CGHLSLRuntime.cpp.
References clang::CodeGen::Decl, emitSystemSemanticLoad(), and clang::CodeGen::Type.
Referenced by handleSemanticLoad().
|
protected |
Definition at line 800 of file CGHLSLRuntime.cpp.
References clang::CodeGen::Decl, and emitSystemSemanticStore().
Referenced by handleSemanticStore().
|
protected |
Definition at line 866 of file CGHLSLRuntime.cpp.
References clang::CodeGen::Decl, handleScalarSemanticLoad(), handleStructSemanticLoad(), and clang::CodeGen::Type.
Referenced by emitEntryFunction(), and handleStructSemanticLoad().
|
protected |
Definition at line 882 of file CGHLSLRuntime.cpp.
References clang::CodeGen::Decl, handleScalarSemanticStore(), and handleStructSemanticStore().
Referenced by emitEntryFunction(), and handleStructSemanticStore().
|
protected |
Definition at line 811 of file CGHLSLRuntime.cpp.
References clang::Aggregate, clang::cast(), clang::CodeGen::Decl, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), handleSemanticLoad(), and clang::CodeGen::Type.
Referenced by handleSemanticLoad().
|
protected |
Definition at line 837 of file CGHLSLRuntime.cpp.
References clang::cast(), clang::CodeGen::Decl, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::Type::getAsRecordDecl(), clang::FunctionDecl::getDeclaredReturnType(), and handleSemanticStore().
Referenced by handleSemanticStore().
| void clang::CodeGen::CGHLSLRuntime::setHLSLEntryAttributes | ( | const FunctionDecl * | FD, |
| llvm::Function * | Fn ) |
Definition at line 490 of file CGHLSLRuntime.cpp.
References CGM, and clang::Decl::getAttr().
Referenced by emitEntryFunction().
| void clang::CodeGen::CGHLSLRuntime::setHLSLFunctionAttributes | ( | const FunctionDecl * | FD, |
| llvm::Function * | Fn ) |
References clang::CodeGen::Decl, and clang::CodeGen::Type.
|
protected |
Definition at line 180 of file CGHLSLRuntime.h.
Referenced by addBuffer(), addRootSignature(), CGHLSLRuntime(), convertHLSLSpecificType(), emitBufferArraySubscriptExpr(), emitBufferMemberExpr(), emitEntryFunction(), emitResourceArraySubscriptExpr(), emitSystemSemanticLoad(), emitSystemSemanticStore(), finishCodeGen(), generateGlobalCtorDtorCalls(), getConvergenceToken(), and setHLSLEntryAttributes().