[PATCH] D41307: [PGO] Fix handling of cold entry count for instrumented PGO

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 13:16:44 PST 2017


davidxl added inline comments.


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:1586
 bool SampleProfileLoader::runOnFunction(Function &F, ModuleAnalysisManager *AM) {
-  F.setEntryCount(0);
+  F.setEntryCount(-1);
   std::unique_ptr<OptimizationRemarkEmitter> OwnedORE;
----------------
Add a comment here and reference the treatment of -1 in getEntryCount()


https://reviews.llvm.org/D41307





More information about the llvm-commits mailing list