[PATCH] D155706: Extend -fkeep-persistent-storage-variables to cover compiler generated artifacts with reasonable mangled names that have persistent storage

2023-07-19 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen created this revision. Herald added a project: All. qianzhen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is a follow-up patch to https://reviews.llvm.org/D150221. It extends -fkeep-persistent-storage-variables to cover co

[PATCH] D155501: Add new option -fkeep-persistent-storage-variables to Clang release notes

2023-07-18 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen updated this revision to Diff 541581. qianzhen added a comment. Update description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155501/new/ https://reviews.llvm.org/D155501 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/Release

[PATCH] D155501: Add new option -fkeep-persistent-storage-variables to Clang release notes

2023-07-17 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen created this revision. Herald added a project: All. qianzhen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch updates the Clang release notes with the new option -fkeep-persistent-storage-variables added at https://revie

[PATCH] D150221: Add option -fkeep-persistent-storage-variables to emit all variables that have a persistent storage duration

2023-07-13 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen updated this revision to Diff 540060. qianzhen added a comment. Add two more test cases 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 cla

[PATCH] D150221: Add option -fkeep-persistent-storage-variables to emit all variables that have a persistent storage duration

2023-07-04 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen added inline comments. Comment at: clang/test/CodeGen/keep-persistent-storage-variables.cpp:32-39 +int test1() { + g1 = 3; + return g1; +} + +int test2() { + return g2; hubert.reinterpretcast wrote: > Why add functions that use `g1` and `g2`? Is there

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

2023-07-04 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen updated this revision to Diff 537175. qianzhen added a comment. Update to address review comments 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

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

2023-06-08 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen added a comment. @erichkeane Thanks for the comments! > How does this work with function-local statics? This is a valid case. The function-local statics should be kept; the missing implementation is added now. > What does the behavior look like in C? The C behavior should be the same

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

2023-06-08 Thread Zheng Qian via Phabricator via cfe-commits
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. Fu

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

2023-05-26 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen updated this revision to Diff 526090. qianzhen added a comment. Update the option text to be more descriptive 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/Co

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

2023-05-24 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen added a comment. Gentle ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150221/new/ https://reviews.llvm.org/D150221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

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

2023-05-18 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen updated this revision to Diff 523546. qianzhen added a comment. Refactor as suggested 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

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

2023-05-12 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen added a comment. This is useful in keeping the static variables in a patchable function (https://clang.llvm.org/docs/AttributeReference.html#patchable-function-entry), so that they can be directly addressed by a hot patch when the optimization to merge them is enabled (https://llvm.or

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

2023-05-09 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen created this revision. Herald added a project: All. qianzhen requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. This patch adds a new option -fkeep-static-variables to emit all static variables if required. This could be usef