[all-commits] [llvm/llvm-project] 2bdfec: [HLSL] Remove global ctor/dtor variable for non-li...

Xiang Li via All-commits all-commits at lists.llvm.org
Thu Oct 6 15:01:06 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2bdfececef4330b3a6489cdb67c57eb771d5f9e4
      https://github.com/llvm/llvm-project/commit/2bdfececef4330b3a6489cdb67c57eb771d5f9e4
  Author: Xiang Li <python3kgae at outlook.com>
  Date:   2022-10-06 (Thu, 06 Oct 2022)

  Changed paths:
    M clang/lib/CodeGen/CGHLSLRuntime.cpp
    M clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl
    M clang/test/CodeGenHLSL/GlobalConstructorLib.hlsl
    M clang/test/CodeGenHLSL/GlobalConstructors.hlsl
    M clang/test/CodeGenHLSL/GlobalDestructors.hlsl

  Log Message:
  -----------
  [HLSL] Remove global ctor/dtor variable for non-lib profile.

After generated call for ctor/dtor for entry, global variable for ctor/dtor are useless.
Remove them for non-lib profiles.
Lib profile still need these in case export function used the global variable which require ctor/dtor.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D133993




More information about the All-commits mailing list