[llvm] [BOLT][DWARF] Deduplicate Foreign TU list (PR #97629)
    Maksim Panchenko via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jul  3 13:15:29 PDT 2024
    
    
  
================
@@ -91,6 +91,10 @@ class DWARF5AcceleratorTable {
   uint64_t CurrentUnitOffset = 0;
   const DWARFUnit *CurrentUnit = nullptr;
   std::unordered_map<uint32_t, uint32_t> AbbrevTagToIndexMap;
+  /// Contains a map of TU hashes to a Foreign TU indecies.
+  /// This is used to reduce the size of Foreign TU list since there could be
+  /// multiple TUs with the same hash.
+  std::unordered_map<uint64_t, uint32_t> TUHashToIndexMap;
----------------
maksfb wrote:
Use `DenseMap`?
https://github.com/llvm/llvm-project/pull/97629
    
    
More information about the llvm-commits
mailing list