[all-commits] [llvm/llvm-project] 96547d: [DirectX] Infrastructure to collect shader flags f...

S. Bharadwaj Yadavalli via All-commits all-commits at lists.llvm.org
Mon Nov 25 13:03:08 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96547decd5f12c4357b104d107350c8a14b47650
      https://github.com/llvm/llvm-project/commit/96547decd5f12c4357b104d107350c8a14b47650
  Author: S. Bharadwaj Yadavalli <Bharadwaj.Yadavalli at microsoft.com>
  Date:   2024-11-25 (Mon, 25 Nov 2024)

  Changed paths:
    M llvm/lib/Target/DirectX/DXContainerGlobals.cpp
    M llvm/lib/Target/DirectX/DXILShaderFlags.cpp
    M llvm/lib/Target/DirectX/DXILShaderFlags.h
    M llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp
    A llvm/test/CodeGen/DirectX/ShaderFlags/double-extensions-obj-test.ll
    M llvm/test/CodeGen/DirectX/ShaderFlags/double-extensions.ll
    M llvm/test/CodeGen/DirectX/ShaderFlags/doubles.ll
    M llvm/test/CodeGen/DirectX/ShaderFlags/no_flags.ll

  Log Message:
  -----------
  [DirectX] Infrastructure to collect shader flags for each function (#112967)

Currently, ShaderFlagsAnalysis pass represents various module-level
properties as well as function-level properties of a DXIL Module using a
single mask. However, one mask per function is needed for accurate
computation of shader flags mask, such as for entry function metadata
creation.

This change introduces a structure that wraps a sorted vector of
function-shader flag mask pairs that represent function properties
instead of a single shader flag mask that represents module properties
and properties of all functions. The result type of ShaderFlagsAnalysis
pass is changed to newly-defined structure type instead of a single
shader flags mask.

This allows accurate computation of shader flags of an entry function
(and all functions in a library shader) for use during its metadata
generation (DXILTranslateMetadata pass) and its feature flags in DX
container globals construction (DXContainerGlobals pass) based on the
shader flags mask of functions. However, note that the change to
implement propagation of such callee-based shader flags mask computation
is planned in a follow-on PR. Consequently, this PR changes shader flag
mask computation in DXILTranslateMetadata and DXContainerGlobals passes
to simply be a union of module flags and shader flags of all functions,
thereby retaining the existing effect of using a single shader flag
mask.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list