[PATCH] D29203: Change debug-info-for-profiling from a TargetOption to a function attribute.

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 11:15:30 PST 2017


danielcdh added a comment.

After a lengthy discussion with @dblaikie (Thanks David for the input), let me add some more context to this patch.

- What is the impact of adding -fdebug-info-for-profiling
  - It will not affect the generated code
  - It will increase the debug info size in -gmlt by ~17%
  - It will not increase the debug info size in -g binary
  - The compile time change should be negligible

- What we use a binary built with out -fdebug-info-for-profiling to collect profile
  - The profile will be inaccurate and will yield sub-optimal performance when used to drive SamplePGO

- What is the motivating example that you want to compile some sources with -fdebug-info-for-profiling and some without
  - If the debug info size is a concern for -gmlt binary, then one would want to only enable this flag for sources that is performance-critical


https://reviews.llvm.org/D29203





More information about the llvm-commits mailing list