[PATCH] D19855: [PGO] Don't value-instrument llvm.global_ctors and llvm.global_dtors functions
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 21:20:44 PDT 2016
silvas added a subscriber: silvas.
silvas added a comment.
In http://reviews.llvm.org/D19855#420069, @davidxl wrote:
> This does not work well for O0 compilation. __cxx_global_var_init also needs to be skipped, but it is not directly referenced by llvm.global_ctors. Probably just skip functions in startup section.
I don't think that is a good solution. The name of that section is not always applied and varies from platform to platform even when it is applied (see getStaticInitSectionSpecifier in clang and its overrides; duplicating that information in this pass is undesirable).
Maybe we could do a CG walk from the `llvm.global_[cd]tors` functions or something? A naive walk is probably not sufficient (would find too many things). But maybe functions used transitively by `llvm.global_[cd]tors` and that is the only use?
http://reviews.llvm.org/D19855
More information about the llvm-commits
mailing list