14#ifndef LLVM_TARGET_DIRECTX_DXILSHADERFLAGS_H
15#define LLVM_TARGET_DIRECTX_DXILSHADERFLAGS_H
29class DXILResourceTypeMap;
34#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
36#define DXIL_MODULE_FLAG(DxilModuleBit, FlagName, Str) bool FlagName : 1;
37#include "llvm/BinaryFormat/DXContainerConstants.def"
39#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
41#define DXIL_MODULE_FLAG(DxilModuleBit, FlagName, Str) FlagName = false;
43#include "llvm/BinaryFormat/DXContainerConstants.def"
47 return Bit != -1 ? 1ull << Bit : 0;
52#define DXIL_MODULE_FLAG(DxilModuleBit, FlagName, Str) \
53 ModuleFlags |= FlagName ? getMask(DxilModuleBit) : 0ull;
54#include "llvm/BinaryFormat/DXContainerConstants.def"
60#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
61 FlagValue |= FlagName ? getMask(DxilModuleBit) : 0ull;
62#include "llvm/BinaryFormat/DXContainerConstants.def"
68#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
69 FeatureFlags |= FlagName ? getMask(FeatureBit) : 0ull;
70#include "llvm/BinaryFormat/DXContainerConstants.def"
75#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
76 FlagName |= (IVal & getMask(DxilModuleBit));
77#define DXIL_MODULE_FLAG(DxilModuleBit, FlagName, Str) \
78 FlagName |= (IVal & getMask(DxilModuleBit));
79#include "llvm/BinaryFormat/DXContainerConstants.def"
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
This header defines various interfaces for pass management in LLVM.
Machine Check Debug Module
A container for analyses that lazily runs them and caches their results.
Represent the analysis usage information of a pass.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
A Module instance is used to store all the information related to an LLVM module.
A set of analyses that are preserved following a run of a transformation pass.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Printer pass for ShaderFlagsAnalysis results.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
ShaderFlagsAnalysisPrinter(raw_ostream &OS)
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...
const ModuleShaderFlags & getShaderFlags()
bool runOnModule(Module &M) override
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
ShaderFlagsAnalysisWrapper()
ShaderFlagsAnalysis()=default
ModuleShaderFlags run(Module &M, ModuleAnalysisManager &AM)
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
A CRTP mix-in to automatically provide informational APIs needed for passes.
uint64_t getModuleFlags() const
void merge(const uint64_t IVal)
constexpr uint64_t getMask(int Bit) const
uint64_t getFeatureFlags() const
LLVM_DUMP_METHOD void dump() const
void print(raw_ostream &OS=dbgs()) const
const ComputedShaderFlags & getFunctionFlags(const Function *) const
Return the shader flags mask of the specified function Func.
const ComputedShaderFlags & getCombinedFlags() const
void initialize(const Module &, DXILResourceTypeMap &DRTM)