[PATCH] D20648: Analysis pass to access profile summary info

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 15:52:16 PDT 2016


vsk added inline comments.

================
Comment at: lib/Analysis/ProfileSummaryInfo.cpp:44
@@ +43,3 @@
+  };
+  auto It = std::find_if(DS.begin(), DS.end(), FindPercentile);
+  // The required percentile has to match one of the percentiles in the
----------------
eraman wrote:
> vsk wrote:
> > Why not a lower_bound? That should be faster, and it adds a bit of flexibility, I think.
> If we want the flexibility of not specifying an exact percentile, won't nearest entry (minimum difference) be better than lower_bound? 
ISTM that breaks the function's contract. It would no longer always return the minimum execution count for a given percentile: it could return something greater.


http://reviews.llvm.org/D20648





More information about the llvm-commits mailing list