[PATCH] D150221: Add option -fkeep-static-variables to emit all static variables

Zheng Qian via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 08:17:10 PDT 2023


qianzhen updated this revision to Diff 529601.
qianzhen added a comment.

More examples have been identified for the adaptation of IBM XL compiler's -qstatsym option for the hot patch use case, which was mentioned previously. Therefore, this option is extended to cover the following cases.

1. Function-local static variables
2. Thread-local variables

The test case is updated to add more coverage accordingly.
Since the option is now covering not only the variables with static storage duration, but also those with thread storage duration, the option name is changed to -fkeep-persistent-storage-variables. Any suggestions would be appreciated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150221/new/

https://reviews.llvm.org/D150221

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/CGDecl.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/CodeGen/keep-persistent-storage-variables.cpp
  clang/test/Driver/fkeep-persistent-storage-variables.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150221.529601.patch
Type: text/x-patch
Size: 7329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230608/9eab041c/attachment.bin>


More information about the cfe-commits mailing list