[llvm] [DirectX] Propagate shader flags mask of callees to callers (PR #118306)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 08:49:01 PST 2024


================
@@ -117,7 +156,7 @@ PreservedAnalyses ShaderFlagsAnalysisPrinter::run(Module &M,
   for (const auto &F : M.getFunctionList()) {
     if (F.isDeclaration())
       continue;
-    auto SFMask = FlagsInfo.getFunctionFlags(&F);
+    const ComputedShaderFlags &SFMask = FlagsInfo.getFunctionFlags(&F);
----------------
llvm-beanz wrote:

This is fine, but FWIW, since `sizeof(ComputedShaderFlags) == 8`, the cost of a copy here is negligible since the address being copied for the reference will also be 64-bits in all the cases we care about.

https://github.com/llvm/llvm-project/pull/118306


More information about the llvm-commits mailing list