[PATCH] D35746: Make new PM honor -fdebug-info-for-profiling (clang side)

Dehao Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 21 15:59:32 PDT 2017


danielcdh created this revision.
Herald added a subscriber: sanjoy.

The new PM needs to invoke add-discriminator pass when building with -fdebug-info-for-profiling.


https://reviews.llvm.org/D35746

Files:
  lib/CodeGen/BackendUtil.cpp


Index: lib/CodeGen/BackendUtil.cpp
===================================================================
--- lib/CodeGen/BackendUtil.cpp
+++ lib/CodeGen/BackendUtil.cpp
@@ -861,7 +861,9 @@
     (PGOOpt.RunProfileGen ||
       !PGOOpt.ProfileUseFile.empty() ||
       !PGOOpt.SampleProfileFile.empty()) ?
-        Optional<PGOOptions>(PGOOpt) : None);
+        Optional<PGOOptions>(PGOOpt) : None,
+    (CodeGenOpts.DebugInfoForProfiling ||
+     !CodeGenOpts.SampleProfileFile.empty()));
 
   LoopAnalysisManager LAM;
   FunctionAnalysisManager FAM;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35746.107747.patch
Type: text/x-patch
Size: 548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170721/f76801e5/attachment.bin>


More information about the cfe-commits mailing list