LLVM 24.0.0git
DXILSignatureAnalysis.cpp File Reference
#include "DXILSignatureAnalysis.h"
#include "DirectX.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/DXILMetadataAnalysis.h"
#include "llvm/Frontend/HLSL/SemanticSignaturePacking.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/IntrinsicsDirectX.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/DXContainerPSVInfo.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/raw_ostream.h"
#include <array>
#include <set>

Go to the source code of this file.

Functions

static Error signatureError (const Twine &Message)
static bool isSignatureAccess (const IntrinsicInst &I)
static Error checkElementNode (const MDNode *Node)
static bool isIntegerComponent (ElementType Type)
static Error validateSemanticType (const SemanticSignatureElement &E)
static Error validateSemanticIndex (const SemanticSignatureElement &E)
static Error parseSignature (Metadata *MD, SmallVectorImpl< SemanticSignatureElement > &Out, ModuleSignatureInfo &Info, Triple::EnvironmentType Stage, IOType IO, bool Native16, unsigned &Extent)
static Error analyzeAccess (const IntrinsicInst &I, EntrySignature &Sig)
static void buildDependencyMap (EntrySignature &Sig)
static Expected< ModuleSignatureInfo > analyzeModule (Module &M, const ModuleMetadataInfo &MMI)
static ModuleSignatureInfo collectSignatures (Module &M, const ModuleMetadataInfo &MMI)
static MDNode * emitSignature (LLVMContext &Ctx, ArrayRef< SemanticSignatureElement > Elements, VersionTuple ValidatorVersion)
static dxbc::SigComponentType getComponentType (ElementType Type, bool Legacy)
static dxbc::D3DSystemValue getSystemValue (dxbc::PSV::SemanticKind Kind)
static StringRef getContainerSemanticName (const SemanticSignatureElement &E)
static void buildSignature (mcdxbc::Signature &Sig, ArrayRef< SemanticSignatureElement > Elements, bool Input, bool Native16, bool Legacy)
static void buildPSVElements (SmallVectorImpl< mcdxbc::PSVSignatureElement > &Dest, ArrayRef< SemanticSignatureElement > Elements, bool Legacy)
 INITIALIZE_PASS_BEGIN (SignatureAnalysisWrapper, "dxil-signature-analysis", "DXIL Semantic Signature Analysis", false, true) INITIALIZE_PASS_END(SignatureAnalysisWrapper

Variables

dxil signature analysis
dxil signature DXIL Semantic Signature Analysis
dxil signature DXIL Semantic Signature false

Function Documentation

◆ analyzeAccess()

◆ analyzeModule()

◆ buildDependencyMap()

◆ buildPSVElements()

◆ buildSignature()

◆ checkElementNode()

◆ collectSignatures()

◆ emitSignature()

◆ getComponentType()

◆ getContainerSemanticName()

StringRef getContainerSemanticName ( const SemanticSignatureElement & E)
static

Definition at line 488 of file DXILSignatureAnalysis.cpp.

References E(), and llvm_unreachable.

Referenced by buildSignature().

◆ getSystemValue()

dxbc::D3DSystemValue getSystemValue ( dxbc::PSV::SemanticKind Kind)
static

Definition at line 460 of file DXILSignatureAnalysis.cpp.

References llvm_unreachable.

Referenced by buildSignature().

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( SignatureAnalysisWrapper ,
"dxil-signature-analysis" ,
"DXIL Semantic Signature Analysis" ,
false ,
true  )

◆ isIntegerComponent()

bool isIntegerComponent ( ElementType Type)
static

◆ isSignatureAccess()

bool isSignatureAccess ( const IntrinsicInst & I)
static

Definition at line 35 of file DXILSignatureAnalysis.cpp.

References I.

Referenced by analyzeModule().

◆ parseSignature()

◆ signatureError()

◆ validateSemanticIndex()

Error validateSemanticIndex ( const SemanticSignatureElement & E)
static

Definition at line 99 of file DXILSignatureAnalysis.cpp.

References E(), signatureError(), and llvm::Error::success().

Referenced by parseSignature().

◆ validateSemanticType()

Variable Documentation

◆ Analysis

dxil signature DXIL Semantic Signature Analysis

Definition at line 650 of file DXILSignatureAnalysis.cpp.

◆ analysis

dxil signature analysis

Definition at line 649 of file DXILSignatureAnalysis.cpp.

◆ false

dxil signature DXIL Semantic Signature false

Definition at line 650 of file DXILSignatureAnalysis.cpp.