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

Xiang Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 15 16:53:16 PDT 2022


python3kgae created this revision.
python3kgae added reviewers: beanz, pow2clk, bogner.
Herald added a subscriber: Anastasia.
Herald added a project: All.
python3kgae requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133993

Files:
  clang/lib/CodeGen/CGHLSLRuntime.cpp
  clang/lib/CodeGen/CGHLSLRuntime.h
  clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl
  clang/test/CodeGenHLSL/GlobalConstructorLib.hlsl
  clang/test/CodeGenHLSL/GlobalConstructors.hlsl
  clang/test/CodeGenHLSL/GlobalDestructors.hlsl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133993.460554.patch
Type: text/x-patch
Size: 3887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220915/9ec13966/attachment.bin>


More information about the cfe-commits mailing list