r276517 - [Profile] Use a flag to enable PGO rather than the profraw filename

Xinliang David Li via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 22 21:28:59 PDT 2016


Author: davidxl
Date: Fri Jul 22 23:28:59 2016
New Revision: 276517

URL: http://llvm.org/viewvc/llvm-project?rev=276517&view=rev
Log:
[Profile] Use a flag to enable PGO rather than the profraw filename

Patch by Jake VanAdrighem

Differential Revision: http://reviews.llvm.org/D22608



Modified:
    cfe/trunk/lib/CodeGen/BackendUtil.cpp

Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=276517&r1=276516&r2=276517&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Fri Jul 22 23:28:59 2016
@@ -453,6 +453,7 @@ void EmitAssemblyHelper::CreatePasses(le
     MPM.add(createInstrProfilingLegacyPass(Options));
   }
   if (CodeGenOpts.hasProfileIRInstr()) {
+    PMBuilder.EnablePGOInstrGen = true;
     if (!CodeGenOpts.InstrProfileOutput.empty())
       PMBuilder.PGOInstrGen = CodeGenOpts.InstrProfileOutput;
     else




More information about the cfe-commits mailing list