clang 22.0.0git
CGHLSLRuntime.cpp File Reference
#include "CGHLSLRuntime.h"
#include "Address.h"
#include "CGDebugInfo.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "TargetInfo.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attrs.inc"
#include "clang/AST/Decl.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Type.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Frontend/HLSL/RootSignatureMetadata.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GlobalVariable.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 <cstdint>
#include <optional>

Go to the source code of this file.

Classes

class  OpaqueValueVisitor

Functions

static const clang::HLSLAttributedResourceType * createBufferHandleType (const HLSLBufferDecl *BufDecl)
static void fillPackoffsetLayout (const HLSLBufferDecl *BufDecl, SmallVector< int32_t > &Layout)
static ValuebuildVectorInput (IRBuilder<> &B, Function *F, llvm::Type *Ty)
static void addSPIRVBuiltinDecoration (llvm::GlobalVariable *GV, unsigned BuiltIn)
static llvm::ValuecreateSPIRVBuiltinLoad (IRBuilder<> &B, llvm::Module &M, llvm::Type *Ty, const Twine &Name, unsigned BuiltInID)
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)

Function Documentation

◆ addSPIRVBuiltinDecoration()

void addSPIRVBuiltinDecoration ( llvm::GlobalVariable * GV,
unsigned BuiltIn )
static

◆ buildVectorInput()

Value * buildVectorInput ( IRBuilder<> & B,
Function * F,
llvm::Type * Ty )
static

◆ createBufferHandleType()

◆ createSPIRVBuiltinLoad()

llvm::Value * createSPIRVBuiltinLoad ( IRBuilder<> & B,
llvm::Module & M,
llvm::Type * Ty,
const Twine & Name,
unsigned BuiltInID )
static

◆ fillPackoffsetLayout()

◆ gatherFunctions()

void gatherFunctions ( SmallVectorImpl< Function * > & Fns,
llvm::Module & M,
bool CtorOrDtor )
static

◆ initializeBuffer()

void initializeBuffer ( CodeGenModule & CGM,
llvm::GlobalVariable * GV,
Intrinsic::ID IntrID,
ArrayRef< llvm::Value * > Args )
static