[llvm] [SampleFDO][NFC] Refactoring sample reader to support on-demand read profiles for given functions (PR #104654)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 22:39:43 PDT 2024
================
@@ -380,6 +380,22 @@ class SampleProfileReader {
return sampleprof_error::success;
}
+ /// Read sample profiles for the given functions. Currently it's only used for
+ /// extended binary format to load the profiles on-demand.
+ std::error_code read(const DenseSet<StringRef> &FuncsToUse) {
+ if (std::error_code EC = read(FuncsToUse, Profiles))
+ return EC;
+ return sampleprof_error::success;
+ };
+
+ /// Read sample profiles for the given functions and write them to the given
+ /// profile map. Currently it's only used for extended binary format to load
+ /// the profiles on-demand.
+ virtual std::error_code read(const DenseSet<StringRef> &FuncsToUse,
+ SampleProfileMap &Profiles) {
+ return sampleprof_error::not_implemented;
+ };
----------------
david-xl wrote:
extra ;?
https://github.com/llvm/llvm-project/pull/104654
More information about the llvm-commits
mailing list