[llvm] [SampleFDO] Read call-graph matching recovered top-level function profile (PR #101053)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 08:19:43 PDT 2024


================
@@ -392,6 +392,11 @@ class SampleProfileReader {
   /// which doesn't support loading function profiles on demand.
   virtual bool collectFuncsFromModule() { return false; }
 
+  virtual std::error_code readOnDemand(const DenseSet<StringRef> &FuncsToUse,
----------------
WenleiHe wrote:

nit: On-demand is how this API is used in call graph matching case. But as an API, the key difference comparing to `readFuncProfiles` is it reads given set of functions, not on-demand. Suggest to name API based on that, maybe just overload `readFuncProfiles`/`read` since the parameters imply the difference?

https://github.com/llvm/llvm-project/pull/101053


More information about the llvm-commits mailing list