LLVM 20.0.0git
Functions | Variables
DXILTranslateMetadata.cpp File Reference
#include "DXILTranslateMetadata.h"
#include "DXILResource.h"
#include "DXILResourceAnalysis.h"
#include "DXILShaderFlags.h"
#include "DirectX.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/DXILMetadataAnalysis.h"
#include "llvm/Analysis/DXILResource.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/TargetParser/Triple.h"
#include <cstdint>

Go to the source code of this file.

Functions

static NamedMDNodeemitResourceMetadata (Module &M, DXILBindingMap &DBM, DXILResourceTypeMap &DRTM, const dxil::Resources &MDResources)
 
static StringRef getShortShaderStage (Triple::EnvironmentType Env)
 
static uint32_t getShaderStage (Triple::EnvironmentType Env)
 
static SmallVector< Metadata * > getTagValueAsMetadata (EntryPropsTag Tag, uint64_t Value, LLVMContext &Ctx)
 
static MDTuplegetEntryPropAsMetadata (const EntryProperties &EP, uint64_t EntryShaderFlags, const Triple::EnvironmentType ShaderProfile)
 
MDTupleconstructEntryMetadata (const Function *EntryFn, MDTuple *Signatures, MDNode *Resources, MDTuple *Properties, LLVMContext &Ctx)
 
static MDTupleemitEntryMD (const EntryProperties &EP, MDTuple *Signatures, MDNode *MDResources, const uint64_t EntryShaderFlags, const Triple::EnvironmentType ShaderProfile)
 
static void emitValidatorVersionMD (Module &M, const ModuleMetadataInfo &MMDI)
 
static void emitShaderModelVersionMD (Module &M, const ModuleMetadataInfo &MMDI)
 
static void emitDXILVersionTupleMD (Module &M, const ModuleMetadataInfo &MMDI)
 
static MDTupleemitTopLevelLibraryNode (Module &M, MDNode *RMD, uint64_t ShaderFlags)
 
static void translateMetadata (Module &M, DXILBindingMap &DBM, DXILResourceTypeMap &DRTM, const Resources &MDResources, const ModuleShaderFlags &ShaderFlags, const ModuleMetadataInfo &MMDI)
 
 INITIALIZE_PASS_BEGIN (DXILTranslateMetadataLegacy, "dxil-translate-metadata", "DXIL Translate Metadata", false, false) INITIALIZE_PASS_END(DXILTranslateMetadataLegacy
 

Variables

dxil translate metadata
 
dxil translate DXIL Translate Metadata
 
dxil translate DXIL Translate false
 

Function Documentation

◆ constructEntryMetadata()

MDTuple * constructEntryMetadata ( const Function EntryFn,
MDTuple Signatures,
MDNode Resources,
MDTuple Properties,
LLVMContext Ctx 
)

◆ emitDXILVersionTupleMD()

static void emitDXILVersionTupleMD ( Module M,
const ModuleMetadataInfo MMDI 
)
static

◆ emitEntryMD()

static MDTuple * emitEntryMD ( const EntryProperties EP,
MDTuple Signatures,
MDNode MDResources,
const uint64_t  EntryShaderFlags,
const Triple::EnvironmentType  ShaderProfile 
)
static

◆ emitResourceMetadata()

static NamedMDNode * emitResourceMetadata ( Module M,
DXILBindingMap DBM,
DXILResourceTypeMap DRTM,
const dxil::Resources MDResources 
)
static

◆ emitShaderModelVersionMD()

static void emitShaderModelVersionMD ( Module M,
const ModuleMetadataInfo MMDI 
)
static

◆ emitTopLevelLibraryNode()

static MDTuple * emitTopLevelLibraryNode ( Module M,
MDNode RMD,
uint64_t  ShaderFlags 
)
static

◆ emitValidatorVersionMD()

static void emitValidatorVersionMD ( Module M,
const ModuleMetadataInfo MMDI 
)
static

◆ getEntryPropAsMetadata()

static MDTuple * getEntryPropAsMetadata ( const EntryProperties EP,
uint64_t  EntryShaderFlags,
const Triple::EnvironmentType  ShaderProfile 
)
static

◆ getShaderStage()

static uint32_t getShaderStage ( Triple::EnvironmentType  Env)
static

Definition at line 148 of file DXILTranslateMetadata.cpp.

References llvm::Triple::Pixel.

Referenced by getEntryPropAsMetadata().

◆ getShortShaderStage()

static StringRef getShortShaderStage ( Triple::EnvironmentType  Env)
static

◆ getTagValueAsMetadata()

static SmallVector< Metadata * > getTagValueAsMetadata ( EntryPropsTag  Tag,
uint64_t  Value,
LLVMContext Ctx 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( DXILTranslateMetadataLegacy  ,
"dxil-translate-metadata"  ,
"DXIL Translate Metadata"  ,
false  ,
false   
)

◆ translateMetadata()

static void translateMetadata ( Module M,
DXILBindingMap DBM,
DXILResourceTypeMap DRTM,
const Resources MDResources,
const ModuleShaderFlags ShaderFlags,
const ModuleMetadataInfo MMDI 
)
static

Variable Documentation

◆ false

dxil translate DXIL Translate false

Definition at line 431 of file DXILTranslateMetadata.cpp.

◆ metadata

dxil translate metadata

Definition at line 430 of file DXILTranslateMetadata.cpp.

◆ Metadata

dxil translate DXIL Translate Metadata

Definition at line 431 of file DXILTranslateMetadata.cpp.