|
clang 24.0.0git
|
#include "CGHLSLRuntime.h"#include "CGDebugInfo.h"#include "CGRecordLayout.h"#include "CodeGenFunction.h"#include "CodeGenModule.h"#include "HLSLBufferLayoutBuilder.h"#include "TargetInfo.h"#include "clang/AST/ASTContext.h"#include "clang/AST/Attr.h"#include "clang/AST/Decl.h"#include "clang/AST/Expr.h"#include "clang/AST/HLSLResource.h"#include "clang/AST/MatrixUtils.h"#include "clang/AST/RecursiveASTVisitor.h"#include "clang/AST/Type.h"#include "clang/Basic/DiagnosticDriver.h"#include "clang/Basic/DiagnosticFrontend.h"#include "clang/Basic/SourceManager.h"#include "clang/Basic/TargetOptions.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/Enum.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/ScopeExit.h"#include "llvm/ADT/SmallString.h"#include "llvm/ADT/SmallVector.h"#include "llvm/Frontend/HLSL/HLSLResource.h"#include "llvm/Frontend/HLSL/RootSignatureMetadata.h"#include "llvm/Frontend/HLSL/SemanticSignaturePacking.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/GlobalVariable.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/Metadata.h"#include "llvm/IR/Module.h"#include "llvm/IR/Type.h"#include "llvm/IR/Value.h"#include "llvm/Support/Alignment.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/FormatVariadic.h"#include "llvm/Support/Path.h"#include "llvm/Transforms/Utils/ModuleUtils.h"#include <array>#include <cstdint>#include <optional>Go to the source code of this file.
Classes | |
| class | OpaqueValueVisitor |
Functions | |
| static const clang::HLSLAttributedResourceType * | createBufferHandleType (const HLSLBufferDecl *BufDecl) |
| static Value * | buildVectorInput (IRBuilder<> &B, Function *F, llvm::Type *Ty) |
| static bool | requiresFlatInterpolation (llvm::Type *Ty) |
| static llvm::hlsl::InterpolationMode | getSPIRVInterpolationMode (llvm::hlsl::InterpolationMode InterpMode, llvm::Type *Ty, llvm::Triple::EnvironmentType Stage, llvm::hlsl::IOType IO) |
| static void | addSPIRVInterfaceDecorations (llvm::GlobalVariable *GV, llvm::hlsl::SPIRVInterfaceDecoration Decoration, unsigned Operand, llvm::hlsl::InterpolationMode InterpMode=llvm::hlsl::InterpolationMode::Undefined) |
| static llvm::Value * | createSPIRVInputLoad (IRBuilder<> &B, llvm::Module &M, llvm::Type *Ty, const Twine &Name, llvm::hlsl::SPIRVInterfaceDecoration Decoration, unsigned Operand, llvm::hlsl::InterpolationMode InterpMode) |
| static void | createSPIRVOutputStore (IRBuilder<> &B, llvm::Module &M, llvm::Value *Source, const Twine &Name, llvm::hlsl::SPIRVInterfaceDecoration Decoration, unsigned Operand, llvm::hlsl::InterpolationMode InterpMode) |
| static QualType | getSemanticLeafType (const clang::DeclaratorDecl *Decl) |
| static SemanticShape | getSemanticShape (ASTContext &Ctx, QualType Ty) |
| static llvm::dxil::ElementType | getSignatureComponentType (CodeGenModule &CGM, QualType Ty) |
| static llvm::hlsl::SemanticSignatureElement | createSemanticSignatureElement (CodeGenModule &CGM, uint32_t SigId, HLSLAppliedSemanticAttr *Semantic, std::optional< unsigned > Index, const SemanticShape &Shape) |
| static void | gatherFunctions (SmallVectorImpl< Function * > &Fns, llvm::Module &M, bool CtorOrDtor) |
| static void | initializeBuffer (CodeGenModule &CGM, llvm::GlobalVariable *GV, Intrinsic::ID IntrID, ArrayRef< llvm::Value * > Args) |
|
static |
Definition at line 1132 of file CGHLSLRuntime.cpp.
Referenced by createSPIRVInputLoad(), createSPIRVOutputStore(), and clang::CodeGen::CGHLSLRuntime::handleGlobalVarDefinition().
|
static |
Definition at line 1082 of file CGHLSLRuntime.cpp.
Referenced by clang::CodeGen::CGHLSLRuntime::emitSystemSemanticLoad().
|
static |
Definition at line 891 of file CGHLSLRuntime.cpp.
References clang::cast(), clang::Decl::getASTContext(), clang::ASTContext::getCanonicalTagType(), clang::ASTContext::getHLSLAttributedResourceType(), clang::HLSLBufferDecl::getLayoutStruct(), and clang::QualType::getTypePtr().
Referenced by clang::CodeGen::CGHLSLRuntime::addBuffer().
|
static |
Definition at line 1337 of file CGHLSLRuntime.cpp.
References getSignatureComponentType(), uint32_t, and uint8_t.
|
static |
Definition at line 1182 of file CGHLSLRuntime.cpp.
References addSPIRVInterfaceDecorations().
Referenced by clang::CodeGen::CGHLSLRuntime::emitSystemSemanticLoad().
|
static |
Definition at line 1218 of file CGHLSLRuntime.cpp.
References addSPIRVInterfaceDecorations().
Referenced by clang::CodeGen::CGHLSLRuntime::emitSystemSemanticStore().
|
static |
Definition at line 2108 of file CGHLSLRuntime.cpp.
References clang::cast(), and clang::isa().
Referenced by clang::CodeGen::CGHLSLRuntime::generateGlobalCtorDtorCalls().
|
static |
Definition at line 1296 of file CGHLSLRuntime.cpp.
|
static |
Definition at line 1304 of file CGHLSLRuntime.cpp.
References clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), clang::ASTContext::getExtVectorType(), clang::ASTContext::getLangOpts(), and clang::isMatrixRowMajor().
|
static |
Definition at line 1327 of file CGHLSLRuntime.cpp.
References clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getTypes(), and clang::Type::isSignedIntegerOrEnumerationType().
Referenced by createSemanticSignatureElement().
|
static |
Definition at line 1118 of file CGHLSLRuntime.cpp.
References requiresFlatInterpolation().
Referenced by clang::CodeGen::CGHLSLRuntime::handleScalarSemanticLoad(), and clang::CodeGen::CGHLSLRuntime::handleScalarSemanticStore().
|
static |
Definition at line 2180 of file CGHLSLRuntime.cpp.
References clang::CodeGen::CodeGenModule::AddCXXGlobalInit(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
|
static |
Definition at line 1102 of file CGHLSLRuntime.cpp.
Referenced by getSPIRVInterpolationMode().