LLVM 24.0.0git
DXILShaderFlags.cpp
Go to the documentation of this file.
1//===- DXILShaderFlags.cpp - DXIL Shader Flags helper objects -------------===//
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///
9/// \file This file contains helper objects and APIs for working with DXIL
10/// Shader Flags.
11///
12//===----------------------------------------------------------------------===//
13
14#include "DXILShaderFlags.h"
15#include "DirectX.h"
20#include "llvm/IR/Attributes.h"
22#include "llvm/IR/Instruction.h"
25#include "llvm/IR/Intrinsics.h"
26#include "llvm/IR/IntrinsicsDirectX.h"
27#include "llvm/IR/Module.h"
31
32using namespace llvm;
33using namespace llvm::dxil;
34
63
64static bool checkWaveOps(Intrinsic::ID IID) {
65 // Currently unsupported intrinsics
66 // case Intrinsic::dx_wave_readfirst:
67 // case Intrinsic::dx_wave_reduce.and:
68 // case Intrinsic::dx_wave_reduce.or:
69 // case Intrinsic::dx_wave_reduce.xor:
70 // case Intrinsic::dx_wave_prefixop:
71 // case Intrinsic::dx_quad.readat:
72 // case Intrinsic::dx_quad.readacrossy:
73 // case Intrinsic::dx_quad.readacrossdiagonal:
74 // case Intrinsic::dx_wave_prefixballot:
75 // case Intrinsic::dx_wave_match:
76 // case Intrinsic::dx_wavemulti.*:
77 // case Intrinsic::dx_wavemulti.ballot:
78 // case Intrinsic::dx_quad.vote:
79 switch (IID) {
80 default:
81 return false;
82 case Intrinsic::dx_wave_is_first_lane:
83 case Intrinsic::dx_wave_getlaneindex:
84 case Intrinsic::dx_wave_get_lane_count:
85 case Intrinsic::dx_wave_any:
86 case Intrinsic::dx_wave_all_equal:
87 case Intrinsic::dx_wave_all:
88 case Intrinsic::dx_wave_readlane:
89 case Intrinsic::dx_wave_active_countbits:
90 case Intrinsic::dx_wave_ballot:
91 case Intrinsic::dx_wave_prefix_bit_count:
92 // Wave Active Op Variants
93 case Intrinsic::dx_wave_reduce_or:
94 case Intrinsic::dx_wave_reduce_xor:
95 case Intrinsic::dx_wave_reduce_and:
96 case Intrinsic::dx_wave_reduce_sum:
97 case Intrinsic::dx_wave_reduce_usum:
98 case Intrinsic::dx_wave_product:
99 case Intrinsic::dx_wave_uproduct:
100 case Intrinsic::dx_wave_reduce_max:
101 case Intrinsic::dx_wave_reduce_umax:
102 case Intrinsic::dx_wave_reduce_min:
103 case Intrinsic::dx_wave_reduce_umin:
104 // Wave Prefix Op Variants
105 case Intrinsic::dx_wave_prefix_sum:
106 case Intrinsic::dx_wave_prefix_usum:
107 case Intrinsic::dx_wave_prefix_product:
108 case Intrinsic::dx_wave_prefix_uproduct:
109 // Quad Op Variants
110 case Intrinsic::dx_quad_read_across_x:
111 case Intrinsic::dx_quad_read_across_y:
112 case Intrinsic::dx_quad_read_across_diagonal:
113 return true;
114 }
115}
116
118 switch (IID) {
119 default:
120 return false;
121 case Intrinsic::fma:
122 return true;
123 }
124}
125
126/// Texture load and sample operations accept "programmable offsets", i.e.
127/// offsets that are not compile-time constants. Such offsets require the
128/// AdvancedTextureOps shader feature flag. Returns true if \p II is one of
129/// those operations and its offsets operand is not a constant.
131 // TODO: (#116137) Several other DXIL ops also require this feature flag, but
132 // none of them can be generated yet:
133 // - SampleCmp, SampleCmpBias, SampleCmpGrad and SampleCmpLevelZero set the
134 // flag for non-constant offsets, exactly like the ops handled below.
135 // - SampleCmpLevel, TextureGatherRaw and TextureStoreSample set the flag
136 // unconditionally, and have no intrinsics yet.
137
138 // The offsets operand index differs between the intrinsics.
139 unsigned OffsetsIdx;
140 switch (II.getIntrinsicID()) {
141 default:
142 return false;
143 case Intrinsic::dx_resource_load_level:
144 case Intrinsic::dx_resource_sample:
145 case Intrinsic::dx_resource_sample_clamp:
146 OffsetsIdx = 3;
147 break;
148 case Intrinsic::dx_resource_samplebias:
149 case Intrinsic::dx_resource_samplebias_clamp:
150 case Intrinsic::dx_resource_samplelevel:
151 OffsetsIdx = 4;
152 break;
153 case Intrinsic::dx_resource_samplegrad:
154 case Intrinsic::dx_resource_samplegrad_clamp:
155 OffsetsIdx = 5;
156 break;
157 }
158 return !isa<Constant>(II.getArgOperand(OffsetsIdx));
159}
160
161static bool isOptimizationDisabled(const Module &M) {
162 const StringRef Key = "dx.disable_optimizations";
163 if (auto *Flag = mdconst::extract_or_null<ConstantInt>(M.getModuleFlag(Key)))
164 return Flag->getValue().getBoolValue();
165 return false;
166}
167
168// Checks to see if the status bit from a load with status
169// instruction is ever extracted. If it is, the module needs
170// to have the TiledResources shader flag set.
172 [[maybe_unused]] Intrinsic::ID IID = II.getIntrinsicID();
173 assert(IID == Intrinsic::dx_resource_load_typedbuffer ||
174 IID == Intrinsic::dx_resource_load_rawbuffer &&
175 "unexpected intrinsic ID");
176 for (const User *U : II.users()) {
177 if (const ExtractValueInst *EVI = dyn_cast<ExtractValueInst>(U)) {
178 // Resource load operations return a {result, status} pair.
179 // Check if we extract the status
180 if (EVI->getNumIndices() == 1 && EVI->getIndices()[0] == 1)
181 return true;
182 }
183 }
184
185 return false;
186}
187
188/// Update the shader flags mask based on the given instruction.
189/// \param CSF Shader flags mask to update.
190/// \param I Instruction to check.
191void ModuleShaderFlags::updateFunctionFlags(ComputedShaderFlags &CSF,
192 const Instruction &I,
194 const ModuleMetadataInfo &MMDI) {
195 if (!CSF.Doubles)
196 CSF.Doubles = I.getType()->getScalarType()->isDoubleTy();
197
198 if (!CSF.Doubles) {
199 for (const Value *Op : I.operands()) {
200 if (Op->getType()->getScalarType()->isDoubleTy()) {
201 CSF.Doubles = true;
202 break;
203 }
204 }
205 }
206
207 if (CSF.Doubles) {
208 switch (I.getOpcode()) {
209 case Instruction::FDiv:
210 case Instruction::UIToFP:
211 case Instruction::SIToFP:
212 case Instruction::FPToUI:
213 case Instruction::FPToSI:
214 CSF.DX11_1_DoubleExtensions = true;
215 break;
216 }
217 }
218
219 if (!CSF.LowPrecisionPresent)
220 CSF.LowPrecisionPresent = I.getType()->getScalarType()->isIntegerTy(16) ||
221 I.getType()->getScalarType()->isHalfTy();
222
223 if (!CSF.LowPrecisionPresent) {
224 for (const Value *Op : I.operands()) {
225 if (Op->getType()->getScalarType()->isIntegerTy(16) ||
226 Op->getType()->getScalarType()->isHalfTy()) {
227 CSF.LowPrecisionPresent = true;
228 break;
229 }
230 }
231 }
232
233 if (CSF.LowPrecisionPresent) {
234 if (CSF.NativeLowPrecisionMode)
235 CSF.NativeLowPrecision = true;
236 else
237 CSF.MinimumPrecision = true;
238 }
239
240 if (!CSF.Int64Ops)
241 CSF.Int64Ops = I.getType()->getScalarType()->isIntegerTy(64);
242
243 if (!CSF.Int64Ops && !isa<LifetimeIntrinsic>(&I)) {
244 for (const Value *Op : I.operands()) {
245 if (Op->getType()->getScalarType()->isIntegerTy(64)) {
246 CSF.Int64Ops = true;
247 break;
248 }
249 }
250 }
251
252 if (const auto *II = dyn_cast<IntrinsicInst>(&I)) {
253 CSF.AdvancedTextureOps |= checkAdvancedTextureOps(*II);
254
255 switch (II->getIntrinsicID()) {
256 default:
257 break;
258 case Intrinsic::dx_resource_handlefrombinding: {
259 dxil::ResourceTypeInfo &RTI = DRTM[cast<TargetExtType>(II->getType())];
260
261 // Set ResMayNotAlias if DXIL validator version >= 1.8 and the function
262 // uses UAVs
263 if (!CSF.ResMayNotAlias && CanSetResMayNotAlias &&
264 MMDI.ValidatorVersion >= VersionTuple(1, 8) && RTI.isUAV())
265 CSF.ResMayNotAlias = true;
266
267 switch (RTI.getResourceKind()) {
270 CSF.EnableRawAndStructuredBuffers = true;
271 break;
272 default:
273 break;
274 }
275 break;
276 }
277 case Intrinsic::dx_resource_load_typedbuffer: {
278 dxil::ResourceTypeInfo &RTI =
279 DRTM[cast<TargetExtType>(II->getArgOperand(0)->getType())];
280 if (RTI.isTyped() && RTI.isUAV())
281 CSF.TypedUAVLoadAdditionalFormats |= RTI.getTyped().ElementCount > 1;
282 if (!CSF.TiledResources && checkIfStatusIsExtracted(*II))
283 CSF.TiledResources = true;
284 break;
285 }
286 case Intrinsic::dx_resource_load_rawbuffer: {
287 if (!CSF.TiledResources && checkIfStatusIsExtracted(*II))
288 CSF.TiledResources = true;
289 break;
290 }
291 case Intrinsic::dx_resource_atomic_binop: {
292 if (II->getType()->isIntegerTy(64)) {
293 dxil::ResourceTypeInfo &RTI =
294 DRTM[cast<TargetExtType>(II->getArgOperand(0)->getType())];
295 if (RTI.isTyped())
296 CSF.AtomicInt64OnTypedResource = true;
297 // TODO(https://github.com/llvm/llvm-project/issues/116152): Set
298 // AtomicInt64OnHeapResource when heap-resource intrinsics are added.
299 }
300 break;
301 }
302 }
303 }
304 // 64-bit atomics on groupshared memory (address space 3).
305 if (const auto *ARMW = dyn_cast<AtomicRMWInst>(&I)) {
306 if (ARMW->getValOperand()->getType()->isIntegerTy(64) &&
307 ARMW->getPointerAddressSpace() == 3)
308 CSF.AtomicInt64OnGroupShared = true;
309 } else if (const auto *AXCG = dyn_cast<AtomicCmpXchgInst>(&I)) {
310 if (AXCG->getNewValOperand()->getType()->isIntegerTy(64) &&
311 AXCG->getPointerAddressSpace() == 3)
312 CSF.AtomicInt64OnGroupShared = true;
313 }
314 // Handle call instructions
315 if (auto *CI = dyn_cast<CallInst>(&I)) {
316 const Function *CF = CI->getCalledFunction();
317 // Merge-in shader flags mask of the called function in the current module
318 if (FunctionFlags.contains(CF))
319 CSF.merge(FunctionFlags[CF]);
320
321 CSF.DX11_1_DoubleExtensions |=
322 checkDoubleExtensionOps(CI->getIntrinsicID());
323 CSF.WaveOps |= checkWaveOps(CI->getIntrinsicID());
324 }
325}
326
327/// Set shader flags that apply to all functions within the module
329ModuleShaderFlags::gatherGlobalModuleFlags(const Module &M,
330 const DXILResourceMap &DRM,
331 const ModuleMetadataInfo &MMDI) {
332
333 ComputedShaderFlags CSF;
334
335 CSF.DisableOptimizations = isOptimizationDisabled(M);
336
337 CSF.UAVsAtEveryStage = hasUAVsAtEveryStage(DRM, MMDI);
338
339 // Set the Max64UAVs flag if the number of UAVs is > 8
340 uint32_t NumUAVs = 0;
341 for (auto &UAV : DRM.uavs())
342 if (MMDI.ValidatorVersion < VersionTuple(1, 6)) {
343 NumUAVs++;
344 } else { // MMDI.ValidatorVersion >= VersionTuple(1, 6)
345 uint32_t Size = UAV.getBinding().Size;
346 uint32_t NewNum = NumUAVs + (Size == 0 ? ~0U : Size);
347 if (NewNum < NumUAVs)
348 NewNum = ~0U;
349 NumUAVs = NewNum;
350 }
351 if (NumUAVs > 8)
352 CSF.Max64UAVs = true;
353
354 // Set the module flag that enables native low-precision execution mode.
355 // NativeLowPrecisionMode can only be set when the command line option
356 // -enable-16bit-types is provided. This is indicated by the dx.nativelowprec
357 // module flag being set
358 // This flag is needed even if the module does not use 16-bit types because a
359 // corresponding debug module may include 16-bit types, and tools that use the
360 // debug module may expect it to have the same flags as the original
361 if (auto *NativeLowPrec = mdconst::extract_or_null<ConstantInt>(
362 M.getModuleFlag("dx.nativelowprec")))
363 if (MMDI.ShaderModelVersion >= VersionTuple(6, 2))
364 CSF.NativeLowPrecisionMode = NativeLowPrec->getValue().getBoolValue();
365
366 // Set ResMayNotAlias to true if DXIL validator version < 1.8 and there
367 // are UAVs present globally.
368 if (CanSetResMayNotAlias && MMDI.ValidatorVersion < VersionTuple(1, 8))
369 CSF.ResMayNotAlias = !DRM.uavs().empty();
370
371 // The command line option -all-resources-bound will set the
372 // dx.allresourcesbound module flag to 1
373 if (auto *AllResourcesBound = mdconst::extract_or_null<ConstantInt>(
374 M.getModuleFlag("dx.allresourcesbound")))
375 if (AllResourcesBound->getValue().getBoolValue())
376 CSF.AllResourcesBound = true;
377
378 return CSF;
379}
380
381/// Construct ModuleShaderFlags for module Module M
383 const DXILResourceMap &DRM,
384 const ModuleMetadataInfo &MMDI) {
385
386 CanSetResMayNotAlias = MMDI.DXILVersion >= VersionTuple(1, 7);
387 // The command line option -res-may-alias will set the dx.resmayalias module
388 // flag to 1, thereby disabling the ability to set the ResMayNotAlias flag
389 if (auto *ResMayAlias = mdconst::extract_or_null<ConstantInt>(
390 M.getModuleFlag("dx.resmayalias")))
391 if (ResMayAlias->getValue().getBoolValue())
392 CanSetResMayNotAlias = false;
393
394 ComputedShaderFlags GlobalSFMask = gatherGlobalModuleFlags(M, DRM, MMDI);
395
396 CallGraph CG(M);
397
398 // Compute Shader Flags Mask for all functions using post-order visit of SCC
399 // of the call graph.
400 for (scc_iterator<CallGraph *> SCCI = scc_begin(&CG); !SCCI.isAtEnd();
401 ++SCCI) {
402 const std::vector<CallGraphNode *> &CurSCC = *SCCI;
403
404 // Union of shader masks of all functions in CurSCC
406 // List of functions in CurSCC that are neither external nor declarations
407 // and hence whose flags are collected
408 SmallVector<Function *> CurSCCFuncs;
409 for (CallGraphNode *CGN : CurSCC) {
410 Function *F = CGN->getFunction();
411 if (!F)
412 continue;
413
414 if (F->isDeclaration()) {
415 assert(!F->getName().starts_with("dx.op.") &&
416 "DXIL Shader Flag analysis should not be run post-lowering.");
417 continue;
418 }
419
420 ComputedShaderFlags CSF = GlobalSFMask;
421 for (const auto &BB : *F)
422 for (const auto &I : BB)
423 updateFunctionFlags(CSF, I, DRTM, MMDI);
424 // Update combined shader flags mask for all functions in this SCC
425 SCCSF.merge(CSF);
426
427 CurSCCFuncs.push_back(F);
428 }
429
430 // Update combined shader flags mask for all functions of the module
431 CombinedSFMask.merge(SCCSF);
432
433 // Shader flags mask of each of the functions in an SCC of the call graph is
434 // the union of all functions in the SCC. Update shader flags masks of
435 // functions in CurSCC accordingly. This is trivially true if SCC contains
436 // one function.
437 for (Function *F : CurSCCFuncs)
438 // Merge SCCSF with that of F
439 FunctionFlags[F].merge(SCCSF);
440 }
441}
442
444 uint64_t FlagVal = (uint64_t) * this;
445 OS << formatv("; Shader Flags Value: {0:x8}\n;\n", FlagVal);
446 if (FlagVal == 0)
447 return;
448 OS << "; Note: shader requires additional functionality:\n";
449#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleNum, FlagName, Str) \
450 if (FlagName) \
451 (OS << ";").indent(7) << Str << "\n";
452#include "llvm/BinaryFormat/DXContainerConstants.def"
453 OS << "; Note: extra DXIL module flags:\n";
454#define DXIL_MODULE_FLAG(DxilModuleBit, FlagName, Str) \
455 if (FlagName) \
456 (OS << ";").indent(7) << Str << "\n";
457#include "llvm/BinaryFormat/DXContainerConstants.def"
458 OS << ";\n";
459}
460
461/// Return the shader flags mask of the specified function Func.
464 auto Iter = FunctionFlags.find(Func);
465 assert((Iter != FunctionFlags.end() && Iter->first == Func) &&
466 "Get Shader Flags : No Shader Flags Mask exists for function");
467 return Iter->second;
468}
469
470//===----------------------------------------------------------------------===//
471// ShaderFlagsAnalysis and ShaderFlagsAnalysisPrinterPass
472
473// Provide an explicit template instantiation for the static ID.
474AnalysisKey ShaderFlagsAnalysis::Key;
475
481
483 MSFI.initialize(M, DRTM, DRM, MMDI);
484
485 return MSFI;
486}
487
490 const ModuleShaderFlags &FlagsInfo = AM.getResult<ShaderFlagsAnalysis>(M);
491 // Print description of combined shader flags for all module functions
492 OS << "; Combined Shader Flags for Module\n";
493 FlagsInfo.getCombinedFlags().print(OS);
494 // Print shader flags mask for each of the module functions
495 OS << "; Shader Flags for Module Functions\n";
496 for (const auto &F : M.getFunctionList()) {
497 if (F.isDeclaration())
498 continue;
499 const ComputedShaderFlags &SFMask = FlagsInfo.getFunctionFlags(&F);
500 OS << formatv("; Function {0} : {1:x8}\n;\n", F.getName(),
501 (uint64_t)(SFMask));
502 }
503
504 return PreservedAnalyses::all();
505}
506
507//===----------------------------------------------------------------------===//
508// ShaderFlagsAnalysis and ShaderFlagsAnalysisPrinterPass
509
511 DXILResourceTypeMap &DRTM =
512 getAnalysis<DXILResourceTypeWrapperPass>().getResourceTypeMap();
513 DXILResourceMap &DRM =
514 getAnalysis<DXILResourceWrapperPass>().getResourceMap();
515 const ModuleMetadataInfo MMDI =
517
518 MSFI.initialize(M, DRTM, DRM, MMDI);
519 return false;
520}
521
528
530
532 "DXIL Shader Flag Analysis", true, true)
536 "DXIL Shader Flag Analysis", true, true)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file contains the simple types necessary to represent the attributes associated with functions a...
This file provides interfaces used to build and manipulate a call graph, which is a very useful tool ...
bool checkIfStatusIsExtracted(const IntrinsicInst &II)
static bool isOptimizationDisabled(const Module &M)
static bool hasUAVsAtEveryStage(const DXILResourceMap &DRM, const ModuleMetadataInfo &MMDI)
static bool checkDoubleExtensionOps(Intrinsic::ID IID)
static bool checkAdvancedTextureOps(const IntrinsicInst &II)
Texture load and sample operations accept "programmable offsets", i.e.
static bool checkWaveOps(Intrinsic::ID IID)
Module.h This file contains the declarations for the Module class.
#define F(x, y, z)
Definition MD5.cpp:54
#define I(x, y, z)
Definition MD5.cpp:57
uint64_t IntrinsicInst * II
#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 builds on the llvm/ADT/GraphTraits.h file to find the strongly connected components (SCCs) of a ...
This file defines the SmallVector class.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represent the analysis usage information of a pass.
AnalysisUsage & addRequired()
void setPreservesAll()
Set by analyses that do not transform their input at all.
AnalysisUsage & addRequiredTransitive()
A node in the call graph for a module.
Definition CallGraph.h:162
The basic data container for the call graph of a Module of IR.
Definition CallGraph.h:72
iterator_range< iterator > uavs()
This instruction extracts a struct member or array element value from an aggregate value.
A wrapper class for inspecting calls to intrinsic functions.
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:67
AnalysisType & getAnalysis() const
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information ...
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
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
@ RayGeneration
Definition Triple.h:402
@ Amplification
Definition Triple.h:409
Represents a version number in the form major[.minor[.subminor[.build]]].
LLVM_ABI bool isUAV() const
LLVM_ABI bool isTyped() const
LLVM_ABI TypedInfo getTyped() const
dxil::ResourceKind getResourceKind() const
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
Wrapper pass for the legacy pass manager.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
bool runOnModule(Module &M) override
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
ModuleShaderFlags run(Module &M, ModuleAnalysisManager &AM)
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
Enumerate the SCCs of a directed graph in reverse topological order of the SCC DAG.
Definition SCCIterator.h:48
bool isAtEnd() const
Direct loop termination test which is more efficient than comparison with end().
std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > extract_or_null(Y &&MD)
Extract a Value from Metadata, allowing null.
Definition Metadata.h:683
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:643
scc_iterator< T > scc_begin(const T &G)
Construct the begin iterator for a deduced graph type T.
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Value
Definition InstrProf.h:143
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
Definition Casting.h:547
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
DWARFExpression::Operation Op
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:559
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
A special type used by analysis passes to provide an address that identifies that particular analysis...
Definition Analysis.h:29
void merge(const ComputedShaderFlags CSF)
void print(raw_ostream &OS=dbgs()) const
Triple::EnvironmentType ShaderProfile
const ComputedShaderFlags & getFunctionFlags(const Function *) const
Return the shader flags mask of the specified function Func.
void initialize(Module &, DXILResourceTypeMap &DRTM, const DXILResourceMap &DRM, const ModuleMetadataInfo &MMDI)
Construct ModuleShaderFlags for module Module M.
const ComputedShaderFlags & getCombinedFlags() const