[llvm] [DirectX] Infrastructure to collect shader flags for each function (PR #112967)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 17:18:27 PDT 2024
================
@@ -60,21 +61,35 @@ struct ComputedShaderFlags {
return FeatureFlags;
}
- static ComputedShaderFlags computeFlags(Module &M);
void print(raw_ostream &OS = dbgs()) const;
LLVM_DUMP_METHOD void dump() const { print(); }
};
+using FuncShaderFlagsMask = std::pair<Function const *, ComputedShaderFlags>;
+using FunctionShaderFlagsVec = SmallVector<FuncShaderFlagsMask>;
+struct DXILModuleShaderFlagsInfo {
+ // Shader Flag mask representing module-level properties
+ ComputedShaderFlags ModuleFlags;
+ // Vector of Function-Shader Flag mask pairs representing properties of each
+ // of the functions in the module
+ FunctionShaderFlagsVec FuncShaderFlagsVec;
----------------
bogner wrote:
These members should probably be private - it's a weird level of abstraction to mix and match direct accesses to ModuleFlags and accesses to the function flags via methods, and it doesn't make sense for users outside of the class to access the function flags directly.
https://github.com/llvm/llvm-project/pull/112967
More information about the llvm-commits
mailing list