[PATCH] D150221: Add option -fkeep-static-variables to emit all static variables
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 16 14:21:49 PDT 2023
efriedma added a comment.
> This is an adaptation of the IBM XL compiler's -qstatsym option, which is meant to generate symbol table entries for static variables. An artifact of that compiler is that static variables are often not discarded even when unused.
Oh, I see; the compiler actually doesn't guarantee that the variables are preserved, it just ends up preserving them by accident because it's bad at optimizing global variables?
Do you have any idea how widespread this is?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150221/new/
https://reviews.llvm.org/D150221
More information about the cfe-commits
mailing list