[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


================
@@ -522,6 +538,16 @@ class SampleProfileReader {
 
   std::unique_ptr<SampleProfileReaderItaniumRemapper> Remapper;
 
+  // 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;
----------------
david-xl wrote:

Drop 'LBR' in name? 

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


More information about the llvm-commits mailing list