[llvm] [DirectX] Infrastructure to collect shader flags for each function (PR #112967)
S. Bharadwaj Yadavalli via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 15 12:59:09 PST 2024
================
@@ -318,22 +314,38 @@ 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.getModuleFlags();
+ for (const auto &FunFlags : ShaderFlags.getFunctionFlags()) {
+ ConsolidatedMask |= FunFlags.second;
+ }
----------------
bharadwajy wrote:
OK. Deleted the access function `getFunctionFlags()`.
https://github.com/llvm/llvm-project/pull/112967
More information about the llvm-commits
mailing list