[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
================
@@ -318,22 +313,39 @@ static void translateMetadata(Module &M, const DXILResourceMap &DRM,
// See https://github.com/llvm/llvm-project/issues/57928
MDTuple *Signatures = nullptr;
- if (MMDI.ShaderProfile == Triple::EnvironmentType::Library)
+ if (MMDI.ShaderProfile == Triple::EnvironmentType::Library) {
+ // Create a consolidated shader flag mask of all functions in the library
+ // to be used as shader flags mask value associated with top-level library
+ // entry metadata.
+ uint64_t ConsolidatedMask = ShaderFlags.ModuleFlags;
+ for (const auto &FunFlags : ShaderFlags.FuncShaderFlagsVec) {
+ ConsolidatedMask |= FunFlags.second;
+ }
----------------
bogner wrote:
Do we really want a mask of both the module level and consolidated function flags here? That seems a bit surprising.
https://github.com/llvm/llvm-project/pull/112967
More information about the llvm-commits
mailing list