14#ifndef LLVM_TARGET_DIRECTX_DXILSHADERFLAGS_H
15#define LLVM_TARGET_DIRECTX_DXILSHADERFLAGS_H
36#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
38#define DXIL_MODULE_FLAG(DxilModuleBit, FlagName, Str) bool FlagName : 1;
39#include "llvm/BinaryFormat/DXContainerConstants.def"
41#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
43#define DXIL_MODULE_FLAG(DxilModuleBit, FlagName, Str) FlagName = false;
45#include "llvm/BinaryFormat/DXContainerConstants.def"
49 return Bit != -1 ? 1ull << Bit : 0;
54#define DXIL_MODULE_FLAG(DxilModuleBit, FlagName, Str) \
55 ModuleFlags |= FlagName ? getMask(DxilModuleBit) : 0ull;
56#include "llvm/BinaryFormat/DXContainerConstants.def"
62#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
63 FlagValue |= FlagName ? getMask(DxilModuleBit) : 0ull;
64#include "llvm/BinaryFormat/DXContainerConstants.def"
70#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
71 FeatureFlags |= FlagName ? getMask(FeatureBit) : 0ull;
72#include "llvm/BinaryFormat/DXContainerConstants.def"
77#define SHADER_FEATURE_FLAG(FeatureBit, DxilModuleBit, FlagName, Str) \
78 FlagName |= CSF.FlagName;
79#define DXIL_MODULE_FLAG(DxilModuleBit, FlagName, Str) FlagName |= CSF.FlagName;
80#include "llvm/BinaryFormat/DXContainerConstants.def"
96 bool CanSetResMayNotAlias;
104 ComputedShaderFlags gatherGlobalModuleFlags(
const Module &M,
106 const ModuleMetadataInfo &);
107 void updateFunctionFlags(ComputedShaderFlags &,
const Instruction &,
#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.
Represent the analysis usage information of a pass.
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.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
ShaderFlagsAnalysisPrinter(raw_ostream &OS)
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.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
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.
void merge(const ComputedShaderFlags CSF)
uint64_t getModuleFlags() const
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.
void initialize(Module &, DXILResourceTypeMap &DRTM, const DXILResourceMap &DRM, const ModuleMetadataInfo &MMDI)
Construct ModuleShaderFlags for module Module M.
const ComputedShaderFlags & getCombinedFlags() const