[PATCH] D54819: [SampleFDO] Skip profile reading when flatten profile is used in ThinLTO postlink phase
    Wei Mi via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jan 11 18:44:07 PST 2019
    
    
  
wmi marked 3 inline comments as done.
wmi added a comment.
Yes, the support is also helpful for old pass manager. Add some code to make it easier to enable sampleprofileloader pass in the pipeline of old pass manager through opt, mainly for testing purpose.
================
Comment at: lib/Passes/PassBuilder.cpp:612
+        PGOOpt->SampleProfileFile, PGOOpt->ProfileRemappingFile,
+        Phase == ThinLTOPhase::PreLink, Phase == ThinLTOPhase::PostLink));
     // Do not invoke ICP in the ThinLTOPrelink phase as it makes it hard
----------------
tejohnson wrote:
> Rather than passing this down and skipping the initialization in the pass, can we just skip adding the pass completely?
Done.
================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:126
 
+static cl::opt<bool> FlattenProfileUsed(
+    "flatten-profile-used", cl::init(false), cl::Hidden,
----------------
tejohnson wrote:
> s/flatten/flattened/ here and in name/description below (and in rest of patch)
Fixed.
Repository:
  rL LLVM
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54819/new/
https://reviews.llvm.org/D54819
    
    
More information about the llvm-commits
mailing list