[all-commits] [llvm/llvm-project] f2650c: [DirectX] Set Shader Flag DisableOptimizations (#1...

S. Bharadwaj Yadavalli via All-commits all-commits at lists.llvm.org
Wed Feb 12 13:45:23 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f2650c54c9a6caf021415ed57a0a430fbb032094
      https://github.com/llvm/llvm-project/commit/f2650c54c9a6caf021415ed57a0a430fbb032094
  Author: S. Bharadwaj Yadavalli <Bharadwaj.Yadavalli at microsoft.com>
  Date:   2025-02-12 (Wed, 12 Feb 2025)

  Changed paths:
    M clang/lib/CodeGen/CGHLSLRuntime.cpp
    R clang/test/CodeGenHLSL/disable_opt.hlsl
    M llvm/lib/Target/DirectX/DXILShaderFlags.cpp
    M llvm/lib/Target/DirectX/DXILShaderFlags.h
    A llvm/test/CodeGen/DirectX/ShaderFlags/disable-opt-cs.ll
    A llvm/test/CodeGen/DirectX/ShaderFlags/disable-opt-lib.ll
    A llvm/test/CodeGen/DirectX/ShaderFlags/lib-entry-attr-error.ll
    M llvm/test/CodeGen/DirectX/llc-pipeline.ll

  Log Message:
  -----------
  [DirectX] Set Shader Flag DisableOptimizations (#126813)

- Set the shader flag `DisableOptimizations` based on `optnone`
attribute of shader entry functions.

- Add DXIL Metadata Analysis pass as pre-requisite for Shader Flags pass
to obtain entry function information collected therein.

- Named module metadata `dx.disable_optimizations` is intended to
indicate disabling optimizations (`-O0`) via commandline flag. However,
its intent is fulfilled by `optnone` attribute of shader entry functions as 
implemented in a recent change, and thus not needed. Delete
generation of named metadata and corresponding test file
`disable_opt.ll`.

- Add tests to verify correctness of setting shader flag.

Closes #112263



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