[PATCH] D75175: [CallSiteInfo] Enable the call site info only for -g + optimizations
David Stenberg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 08:31:12 PST 2020
dstenb added a comment.
One downside with this is that if you compile the compilation unit containing the caller with -O0, and the compilation unit containing the callee with optimizations enabled, it will not be possible to evaluate the entry values in the callee. However, GCC (8.3.0) seems to behave in the same way; at least for the small examples I tried.
================
Comment at: llvm/include/llvm/Target/TargetOptions.h:261
+ /// The flag enables call site info production. It used only for debug
+ /// info, and it is restricted only to optimize code. This can be used for
+ /// something else, so that should be controlled in the frontend.
----------------
Nit: optimize -> optimized
================
Comment at: llvm/include/llvm/Target/TargetOptions.h:266
unsigned EnableDebugEntryValues : 1;
+ /// NOTE: There are targets that still do not support the call site info
+ /// production (the info about the arguments passed to the call, necessary
----------------
What do you think about keeping these as two separate things, and query one of EmitCallSiteInfo / EnableDebugEntryValues at each use? I think that it might make it easier to understand the code if they are treated as separate throughout the compiler rather than being merged here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75175/new/
https://reviews.llvm.org/D75175
More information about the llvm-commits
mailing list