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

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 17:34:40 PDT 2024


================
@@ -522,6 +544,21 @@ class SampleProfileReader {
 
   std::unique_ptr<SampleProfileReaderItaniumRemapper> Remapper;
 
+  // A map pointer to the FuncNameToProfNameMap in SampleProfileLoader,
+  // which maps the function name to the matched profile name. This is used
+  // for sample loader to look up profile using the new name.
+  HashKeyMap<std::unordered_map, FunctionId, FunctionId>
+      *FuncNameToProfNameMap = nullptr;
+
+  // A map from a function's context hash to its meta data section range, used
+  // for on-demand read function profile metadata.
+  std::unordered_map<uint64_t, std::pair<const uint8_t *, const uint8_t *>>
+      FuncMetadataIndex;
+
+  std::pair<const uint8_t *, const uint8_t *> LBRProfileSecRange;
+
+  bool ProfileHasAttribute = false;
----------------
WenleiHe wrote:

Add comment

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


More information about the llvm-commits mailing list