LLVM 22.0.0git
DXILTranslateMetadata.cpp
Go to the documentation of this file.
1//===- DXILTranslateMetadata.cpp - Pass to emit DXIL metadata -------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "DXILShaderFlags.h"
11#include "DirectX.h"
13#include "llvm/ADT/Twine.h"
16#include "llvm/IR/BasicBlock.h"
17#include "llvm/IR/Constants.h"
20#include "llvm/IR/Function.h"
21#include "llvm/IR/IRBuilder.h"
22#include "llvm/IR/LLVMContext.h"
23#include "llvm/IR/MDBuilder.h"
24#include "llvm/IR/Metadata.h"
25#include "llvm/IR/Module.h"
27#include "llvm/Pass.h"
31#include <cstdint>
32
33using namespace llvm;
34using namespace llvm::dxil;
35
36namespace {
37/// A simple Wrapper DiagnosticInfo that generates Module-level diagnostic
38/// for TranslateMetadata pass
39class DiagnosticInfoTranslateMD : public DiagnosticInfo {
40private:
41 const Twine &Msg;
42 const Module &Mod;
43
44public:
45 /// \p M is the module for which the diagnostic is being emitted. \p Msg is
46 /// the message to show. Note that this class does not copy this message, so
47 /// this reference must be valid for the whole life time of the diagnostic.
48 DiagnosticInfoTranslateMD(const Module &M,
49 const Twine &Msg LLVM_LIFETIME_BOUND,
51 : DiagnosticInfo(DK_Unsupported, Severity), Msg(Msg), Mod(M) {}
52
53 void print(DiagnosticPrinter &DP) const override {
54 DP << Mod.getName() << ": " << Msg << '\n';
55 }
56};
57
58enum class EntryPropsTag {
59 ShaderFlags = 0,
60 GSState,
61 DSState,
62 HSState,
63 NumThreads,
64 AutoBindingSpace,
65 RayPayloadSize,
66 RayAttribSize,
67 ShaderKind,
68 MSState,
69 ASStateTag,
70 WaveSize,
71 EntryRootSig,
72};
73
74} // namespace
75
77 DXILResourceTypeMap &DRTM) {
78 LLVMContext &Context = M.getContext();
79
80 for (ResourceInfo &RI : DRM)
81 if (!RI.hasSymbol())
82 RI.createSymbol(M,
83 DRTM[RI.getHandleTy()].createElementStruct(RI.getName()));
84
85 SmallVector<Metadata *> SRVs, UAVs, CBufs, Smps;
86 for (const ResourceInfo &RI : DRM.srvs())
87 SRVs.push_back(RI.getAsMetadata(M, DRTM[RI.getHandleTy()]));
88 for (const ResourceInfo &RI : DRM.uavs())
89 UAVs.push_back(RI.getAsMetadata(M, DRTM[RI.getHandleTy()]));
90 for (const ResourceInfo &RI : DRM.cbuffers())
91 CBufs.push_back(RI.getAsMetadata(M, DRTM[RI.getHandleTy()]));
92 for (const ResourceInfo &RI : DRM.samplers())
93 Smps.push_back(RI.getAsMetadata(M, DRTM[RI.getHandleTy()]));
94
95 Metadata *SRVMD = SRVs.empty() ? nullptr : MDNode::get(Context, SRVs);
96 Metadata *UAVMD = UAVs.empty() ? nullptr : MDNode::get(Context, UAVs);
97 Metadata *CBufMD = CBufs.empty() ? nullptr : MDNode::get(Context, CBufs);
98 Metadata *SmpMD = Smps.empty() ? nullptr : MDNode::get(Context, Smps);
99
100 if (DRM.empty())
101 return nullptr;
102
103 NamedMDNode *ResourceMD = M.getOrInsertNamedMetadata("dx.resources");
104 ResourceMD->addOperand(
105 MDNode::get(M.getContext(), {SRVMD, UAVMD, CBufMD, SmpMD}));
106
107 return ResourceMD;
108}
109
111 switch (Env) {
112 case Triple::Pixel:
113 return "ps";
114 case Triple::Vertex:
115 return "vs";
116 case Triple::Geometry:
117 return "gs";
118 case Triple::Hull:
119 return "hs";
120 case Triple::Domain:
121 return "ds";
122 case Triple::Compute:
123 return "cs";
124 case Triple::Library:
125 return "lib";
126 case Triple::Mesh:
127 return "ms";
129 return "as";
131 return "rootsig";
132 default:
133 break;
134 }
135 llvm_unreachable("Unsupported environment for DXIL generation.");
136}
137
141
146 ConstantInt::get(Type::getInt32Ty(Ctx), static_cast<int>(Tag))));
147 switch (Tag) {
148 case EntryPropsTag::ShaderFlags:
150 ConstantInt::get(Type::getInt64Ty(Ctx), Value)));
151 break;
152 case EntryPropsTag::ShaderKind:
154 ConstantInt::get(Type::getInt32Ty(Ctx), Value)));
155 break;
156 case EntryPropsTag::GSState:
157 case EntryPropsTag::DSState:
158 case EntryPropsTag::HSState:
159 case EntryPropsTag::NumThreads:
160 case EntryPropsTag::AutoBindingSpace:
161 case EntryPropsTag::RayPayloadSize:
162 case EntryPropsTag::RayAttribSize:
163 case EntryPropsTag::MSState:
164 case EntryPropsTag::ASStateTag:
165 case EntryPropsTag::WaveSize:
166 case EntryPropsTag::EntryRootSig:
167 llvm_unreachable("NYI: Unhandled entry property tag");
168 }
169 return MDVals;
170}
171
172static MDTuple *
174 const Triple::EnvironmentType ShaderProfile) {
176 LLVMContext &Ctx = EP.Entry->getContext();
177 if (EntryShaderFlags != 0)
178 MDVals.append(getTagValueAsMetadata(EntryPropsTag::ShaderFlags,
179 EntryShaderFlags, Ctx));
180
181 if (EP.Entry != nullptr) {
182 // FIXME: support more props.
183 // See https://github.com/llvm/llvm-project/issues/57948.
184 // Add shader kind for lib entries.
185 if (ShaderProfile == Triple::EnvironmentType::Library &&
187 MDVals.append(getTagValueAsMetadata(EntryPropsTag::ShaderKind,
188 getShaderStage(EP.ShaderStage), Ctx));
189
191 MDVals.emplace_back(ConstantAsMetadata::get(ConstantInt::get(
192 Type::getInt32Ty(Ctx), static_cast<int>(EntryPropsTag::NumThreads))));
193 Metadata *NumThreadVals[] = {ConstantAsMetadata::get(ConstantInt::get(
194 Type::getInt32Ty(Ctx), EP.NumThreadsX)),
195 ConstantAsMetadata::get(ConstantInt::get(
196 Type::getInt32Ty(Ctx), EP.NumThreadsY)),
197 ConstantAsMetadata::get(ConstantInt::get(
198 Type::getInt32Ty(Ctx), EP.NumThreadsZ))};
199 MDVals.emplace_back(MDNode::get(Ctx, NumThreadVals));
200 }
201 }
202 if (MDVals.empty())
203 return nullptr;
204 return MDNode::get(Ctx, MDVals);
205}
206
208 MDNode *Resources, MDTuple *Properties,
209 LLVMContext &Ctx) {
210 // Each entry point metadata record specifies:
211 // * reference to the entry point function global symbol
212 // * unmangled name
213 // * list of signatures
214 // * list of resources
215 // * list of tag-value pairs of shader capabilities and other properties
216 Metadata *MDVals[5];
217 MDVals[0] =
218 EntryFn ? ValueAsMetadata::get(const_cast<Function *>(EntryFn)) : nullptr;
219 MDVals[1] = MDString::get(Ctx, EntryFn ? EntryFn->getName() : "");
220 MDVals[2] = Signatures;
221 MDVals[3] = Resources;
222 MDVals[4] = Properties;
223 return MDNode::get(Ctx, MDVals);
224}
225
227 MDNode *MDResources,
228 const uint64_t EntryShaderFlags,
229 const Triple::EnvironmentType ShaderProfile) {
230 MDTuple *Properties =
231 getEntryPropAsMetadata(EP, EntryShaderFlags, ShaderProfile);
232 return constructEntryMetadata(EP.Entry, Signatures, MDResources, Properties,
233 EP.Entry->getContext());
234}
235
237 if (MMDI.ValidatorVersion.empty())
238 return;
239
240 LLVMContext &Ctx = M.getContext();
241 IRBuilder<> IRB(Ctx);
242 Metadata *MDVals[2];
243 MDVals[0] =
245 MDVals[1] = ConstantAsMetadata::get(
246 IRB.getInt32(MMDI.ValidatorVersion.getMinor().value_or(0)));
247 NamedMDNode *ValVerNode = M.getOrInsertNamedMetadata("dx.valver");
248 // Set validator version obtained from DXIL Metadata Analysis pass
249 ValVerNode->clearOperands();
250 ValVerNode->addOperand(MDNode::get(Ctx, MDVals));
251}
252
254 const ModuleMetadataInfo &MMDI) {
255 LLVMContext &Ctx = M.getContext();
256 IRBuilder<> IRB(Ctx);
257 Metadata *SMVals[3];
259 SMVals[0] = MDString::get(Ctx, getShortShaderStage(MMDI.ShaderProfile));
260 SMVals[1] = ConstantAsMetadata::get(IRB.getInt32(SM.getMajor()));
261 SMVals[2] = ConstantAsMetadata::get(IRB.getInt32(SM.getMinor().value_or(0)));
262 NamedMDNode *SMMDNode = M.getOrInsertNamedMetadata("dx.shaderModel");
263 SMMDNode->addOperand(MDNode::get(Ctx, SMVals));
264}
265
267 LLVMContext &Ctx = M.getContext();
268 IRBuilder<> IRB(Ctx);
269 VersionTuple DXILVer = MMDI.DXILVersion;
270 Metadata *DXILVals[2];
271 DXILVals[0] = ConstantAsMetadata::get(IRB.getInt32(DXILVer.getMajor()));
272 DXILVals[1] =
273 ConstantAsMetadata::get(IRB.getInt32(DXILVer.getMinor().value_or(0)));
274 NamedMDNode *DXILVerMDNode = M.getOrInsertNamedMetadata("dx.version");
275 DXILVerMDNode->addOperand(MDNode::get(Ctx, DXILVals));
276}
277
279 uint64_t ShaderFlags) {
280 LLVMContext &Ctx = M.getContext();
281 MDTuple *Properties = nullptr;
282 if (ShaderFlags != 0) {
284 MDVals.append(
285 getTagValueAsMetadata(EntryPropsTag::ShaderFlags, ShaderFlags, Ctx));
286 Properties = MDNode::get(Ctx, MDVals);
287 }
288 // Library has an entry metadata with resource table metadata and all other
289 // MDNodes as null.
290 return constructEntryMetadata(nullptr, nullptr, RMD, Properties, Ctx);
291}
292
293// TODO: We might need to refactor this to be more generic,
294// in case we need more metadata to be replaced.
296 for (Function &F : M) {
297 for (BasicBlock &BB : F) {
298 Instruction *BBTerminatorInst = BB.getTerminator();
299
300 MDNode *HlslControlFlowMD =
301 BBTerminatorInst->getMetadata("hlsl.controlflow.hint");
302
303 if (!HlslControlFlowMD)
304 continue;
305
306 assert(HlslControlFlowMD->getNumOperands() == 2 &&
307 "invalid operands for hlsl.controlflow.hint");
308
309 MDBuilder MDHelper(M.getContext());
310 ConstantInt *Op1 =
311 mdconst::extract<ConstantInt>(HlslControlFlowMD->getOperand(1));
312
314 ArrayRef<Metadata *>{MDHelper.createString("dx.controlflow.hints"),
315 MDHelper.createConstant(Op1)});
316
317 MDNode *MDNode = llvm::MDNode::get(M.getContext(), Vals);
318
319 BBTerminatorInst->setMetadata("dx.controlflow.hints", MDNode);
320 BBTerminatorInst->setMetadata("hlsl.controlflow.hint", nullptr);
321 }
322 }
323}
324
327 const ModuleShaderFlags &ShaderFlags,
328 const ModuleMetadataInfo &MMDI) {
329 LLVMContext &Ctx = M.getContext();
330 IRBuilder<> IRB(Ctx);
331 SmallVector<MDNode *> EntryFnMDNodes;
332
333 emitValidatorVersionMD(M, MMDI);
335 emitDXILVersionTupleMD(M, MMDI);
336 NamedMDNode *NamedResourceMD = emitResourceMetadata(M, DRM, DRTM);
337 auto *ResourceMD =
338 (NamedResourceMD != nullptr) ? NamedResourceMD->getOperand(0) : nullptr;
339 // FIXME: Add support to construct Signatures
340 // See https://github.com/llvm/llvm-project/issues/57928
341 MDTuple *Signatures = nullptr;
342
344 // Get the combined shader flag mask of all functions in the library to be
345 // used as shader flags mask value associated with top-level library entry
346 // metadata.
347 uint64_t CombinedMask = ShaderFlags.getCombinedFlags();
348 EntryFnMDNodes.emplace_back(
349 emitTopLevelLibraryNode(M, ResourceMD, CombinedMask));
350 } else if (MMDI.EntryPropertyVec.size() > 1) {
351 M.getContext().diagnose(DiagnosticInfoTranslateMD(
352 M, "Non-library shader: One and only one entry expected"));
353 }
354
355 for (const EntryProperties &EntryProp : MMDI.EntryPropertyVec) {
356 const ComputedShaderFlags &EntrySFMask =
357 ShaderFlags.getFunctionFlags(EntryProp.Entry);
358
359 // If ShaderProfile is Library, mask is already consolidated in the
360 // top-level library node. Hence it is not emitted.
361 uint64_t EntryShaderFlags = 0;
363 EntryShaderFlags = EntrySFMask;
364 if (EntryProp.ShaderStage != MMDI.ShaderProfile) {
365 M.getContext().diagnose(DiagnosticInfoTranslateMD(
366 M,
367 "Shader stage '" +
369 "' for entry '" + Twine(EntryProp.Entry->getName()) +
370 "' different from specified target profile '" +
372 "'"))));
373 }
374 }
375 EntryFnMDNodes.emplace_back(emitEntryMD(EntryProp, Signatures, ResourceMD,
376 EntryShaderFlags,
377 MMDI.ShaderProfile));
378 }
379
380 NamedMDNode *EntryPointsNamedMD =
381 M.getOrInsertNamedMetadata("dx.entryPoints");
382 for (auto *Entry : EntryFnMDNodes)
383 EntryPointsNamedMD->addOperand(Entry);
384}
385
388 DXILResourceMap &DRM = MAM.getResult<DXILResourceAnalysis>(M);
390 const ModuleShaderFlags &ShaderFlags = MAM.getResult<ShaderFlagsAnalysis>(M);
391 const dxil::ModuleMetadataInfo MMDI = MAM.getResult<DXILMetadataAnalysis>(M);
392
393 translateMetadata(M, DRM, DRTM, ShaderFlags, MMDI);
395
396 return PreservedAnalyses::all();
397}
398
399namespace {
400class DXILTranslateMetadataLegacy : public ModulePass {
401public:
402 static char ID; // Pass identification, replacement for typeid
403 explicit DXILTranslateMetadataLegacy() : ModulePass(ID) {}
404
405 StringRef getPassName() const override { return "DXIL Translate Metadata"; }
406
407 void getAnalysisUsage(AnalysisUsage &AU) const override {
408 AU.addRequired<DXILResourceTypeWrapperPass>();
409 AU.addRequired<DXILResourceWrapperPass>();
410 AU.addRequired<ShaderFlagsAnalysisWrapper>();
411 AU.addRequired<DXILMetadataAnalysisWrapperPass>();
412 AU.addPreserved<DXILResourceWrapperPass>();
413 AU.addPreserved<DXILMetadataAnalysisWrapperPass>();
414 AU.addPreserved<ShaderFlagsAnalysisWrapper>();
415 AU.addPreserved<DXILResourceBindingWrapperPass>();
416 }
417
418 bool runOnModule(Module &M) override {
419 DXILResourceMap &DRM =
420 getAnalysis<DXILResourceWrapperPass>().getResourceMap();
421 DXILResourceTypeMap &DRTM =
422 getAnalysis<DXILResourceTypeWrapperPass>().getResourceTypeMap();
423 const ModuleShaderFlags &ShaderFlags =
424 getAnalysis<ShaderFlagsAnalysisWrapper>().getShaderFlags();
425 dxil::ModuleMetadataInfo MMDI =
426 getAnalysis<DXILMetadataAnalysisWrapperPass>().getModuleMetadata();
427
428 translateMetadata(M, DRM, DRTM, ShaderFlags, MMDI);
430 return true;
431 }
432};
433
434} // namespace
435
436char DXILTranslateMetadataLegacy::ID = 0;
437
439 return new DXILTranslateMetadataLegacy();
440}
441
442INITIALIZE_PASS_BEGIN(DXILTranslateMetadataLegacy, "dxil-translate-metadata",
443 "DXIL Translate Metadata", false, false)
447INITIALIZE_PASS_END(DXILTranslateMetadataLegacy, "dxil-translate-metadata",
448 "DXIL Translate Metadata", false, false)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_LIFETIME_BOUND
Definition Compiler.h:435
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static void emitDXILVersionTupleMD(Module &M, const ModuleMetadataInfo &MMDI)
static MDTuple * getEntryPropAsMetadata(const EntryProperties &EP, uint64_t EntryShaderFlags, const Triple::EnvironmentType ShaderProfile)
static void emitValidatorVersionMD(Module &M, const ModuleMetadataInfo &MMDI)
static MDTuple * emitTopLevelLibraryNode(Module &M, MDNode *RMD, uint64_t ShaderFlags)
static SmallVector< Metadata * > getTagValueAsMetadata(EntryPropsTag Tag, uint64_t Value, LLVMContext &Ctx)
static StringRef getShortShaderStage(Triple::EnvironmentType Env)
static void translateBranchMetadata(Module &M)
static void translateMetadata(Module &M, DXILResourceMap &DRM, DXILResourceTypeMap &DRTM, const ModuleShaderFlags &ShaderFlags, const ModuleMetadataInfo &MMDI)
static MDTuple * emitEntryMD(const EntryProperties &EP, MDTuple *Signatures, MDNode *MDResources, const uint64_t EntryShaderFlags, const Triple::EnvironmentType ShaderProfile)
static NamedMDNode * emitResourceMetadata(Module &M, DXILResourceMap &DRM, DXILResourceTypeMap &DRTM)
static uint32_t getShaderStage(Triple::EnvironmentType Env)
MDTuple * constructEntryMetadata(const Function *EntryFn, MDTuple *Signatures, MDNode *Resources, MDTuple *Properties, LLVMContext &Ctx)
static void emitShaderModelVersionMD(Module &M, const ModuleMetadataInfo &MMDI)
Module.h This file contains the declarations for the Module class.
#define F(x, y, z)
Definition MD5.cpp:55
Machine Check Debug Module
This file contains the declarations for metadata subclasses.
ModuleAnalysisManager MAM
#define INITIALIZE_PASS_DEPENDENCY(depName)
Definition PassSupport.h:42
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Definition PassSupport.h:44
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
Definition PassSupport.h:39
This file defines the SmallVector class.
static const FuncProtoTy Signatures[]
Defines the llvm::VersionTuple class, which represents a version in the form major[....
AnalysisUsage & addRequired()
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:41
LLVM Basic Block Representation.
Definition BasicBlock.h:62
static ConstantAsMetadata * get(Constant *C)
Definition Metadata.h:535
This is the shared class of boolean and integer constants.
Definition Constants.h:87
iterator_range< iterator > samplers()
iterator_range< iterator > srvs()
iterator_range< iterator > cbuffers()
iterator_range< iterator > uavs()
PreservedAnalyses run(Module &M, ModuleAnalysisManager &)
This is the base abstract class for diagnostic reporting in the backend.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function.
Definition Function.cpp:359
ConstantInt * getInt32(uint32_t C)
Get a constant 32-bit value.
Definition IRBuilder.h:522
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
Definition IRBuilder.h:2780
MDNode * getMetadata(unsigned KindID) const
Get the metadata of given kind attached to this Instruction.
LLVM_ABI void setMetadata(unsigned KindID, MDNode *Node)
Set the metadata of the specified kind to the specified node.
This is an important class for using LLVM in a threaded context.
Definition LLVMContext.h:68
LLVM_ABI ConstantAsMetadata * createConstant(Constant *C)
Return the given constant as metadata.
Definition MDBuilder.cpp:25
LLVM_ABI MDString * createString(StringRef Str)
Return the given string as metadata.
Definition MDBuilder.cpp:21
Metadata node.
Definition Metadata.h:1077
const MDOperand & getOperand(unsigned I) const
Definition Metadata.h:1445
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
Definition Metadata.h:1565
unsigned getNumOperands() const
Return number of MDNode operands.
Definition Metadata.h:1451
static LLVM_ABI MDString * get(LLVMContext &Context, StringRef Str)
Definition Metadata.cpp:607
Tuple of metadata.
Definition Metadata.h:1493
Root of the metadata hierarchy.
Definition Metadata.h:63
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition Pass.h:255
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:67
A tuple of MDNodes.
Definition Metadata.h:1753
LLVM_ABI MDNode * getOperand(unsigned i) const
LLVM_ABI void clearOperands()
Drop all references to this node's operands.
LLVM_ABI void addOperand(MDNode *M)
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Definition Analysis.h:118
reference emplace_back(ArgTypes &&... Args)
void append(ItTy in_start, ItTy in_end)
Add the specified range to the end of the SmallVector.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
@ RootSignature
Definition Triple.h:308
@ Amplification
Definition Triple.h:307
static LLVM_ABI StringRef getEnvironmentTypeName(EnvironmentType Kind)
Get the canonical name for the Kind environment.
Definition Triple.cpp:341
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition Twine.h:82
static LLVM_ABI IntegerType * getInt64Ty(LLVMContext &C)
Definition Type.cpp:298
static LLVM_ABI IntegerType * getInt32Ty(LLVMContext &C)
Definition Type.cpp:297
static LLVM_ABI ValueAsMetadata * get(Value *V)
Definition Metadata.cpp:502
LLVM Value Representation.
Definition Value.h:75
LLVM_ABI StringRef getName() const
Return a constant reference to the value's name.
Definition Value.cpp:322
Represents a version number in the form major[.minor[.subminor[.build]]].
unsigned getMajor() const
Retrieve the major version number.
bool empty() const
Determine whether this version information is empty (e.g., all version components are zero).
std::optional< unsigned > getMinor() const
Retrieve the minor version number, if provided.
Wrapper pass for the legacy pass manager.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition CallingConv.h:24
std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > extract(Y &&MD)
Extract a Value from Metadata.
Definition Metadata.h:666
This is an optimization pass for GlobalISel generic memory operations.
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
ModulePass * createDXILTranslateMetadataLegacyPass()
Pass to emit metadata for DXIL.
@ DK_Unsupported
DiagnosticSeverity
Defines the different supported severity of a diagnostic.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
Triple::EnvironmentType ShaderStage
Triple::EnvironmentType ShaderProfile
SmallVector< EntryProperties > EntryPropertyVec