[PATCH] D25434: Generate more debug info in -gmlt

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 13:47:18 PST 2017


danielcdh marked 2 inline comments as done.
danielcdh added a comment.

In https://reviews.llvm.org/D25434#640048, @dblaikie wrote:

> Hmm - maybe this shouldn't be a TargetOptions flag?
>
> Should this be module flag (passed through metadata) so that with LTO object files individual preferences are respected? (some may request this extra info, some may not)


I think this should be a binary attribute because it will change the discriminator algorithm to encode the duplication factor. This should be consistent across all modules.



================
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1182-1184
+  // If -fprofile-debug is enabled, need to emit the subprogram and its source
+  // location.
+  if (Asm->TM.Options.DebugInfoForProfiling || !Minimal)
----------------
dblaikie wrote:
> dblaikie wrote:
> > Another out of date comment
> Can this "DebugInfoForProfiling" check be floated up to the caller? (rename the 'Minimal' flag parameter to something more descriptive for the behavior change that applies to both debug-info-for-profiling and otherwise?)
Changed Minimal to SkipSPAttributes because there is no need to output additional attributes when DebugInfoForProfiling (thus cannot float it to caller). Does it sound OK?


https://reviews.llvm.org/D25434





More information about the llvm-commits mailing list