[llvm] [BOLT][DWARF][NFC] Remove DWO ranges base (PR #99284)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 09:27:06 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-bolt

Author: Sayhaan Siddiqui (sayhaan)

<details>
<summary>Changes</summary>

Removes getters and setters for DWO ranges base due to it not being used.

---
Full diff: https://github.com/llvm/llvm-project/pull/99284.diff


2 Files Affected:

- (modified) bolt/include/bolt/Rewrite/DWARFRewriter.h (-9) 
- (modified) bolt/lib/Rewrite/DWARFRewriter.cpp (-1) 


``````````diff
diff --git a/bolt/include/bolt/Rewrite/DWARFRewriter.h b/bolt/include/bolt/Rewrite/DWARFRewriter.h
index abd18b56113b6..b798c5b76fc28 100644
--- a/bolt/include/bolt/Rewrite/DWARFRewriter.h
+++ b/bolt/include/bolt/Rewrite/DWARFRewriter.h
@@ -95,9 +95,6 @@ class DWARFRewriter {
 
   std::mutex LocListDebugInfoPatchesMutex;
 
-  /// Dwo id specific its RangesBase.
-  std::unordered_map<uint64_t, uint64_t> DwoRangesBase;
-
   std::unordered_map<DWARFUnit *, uint64_t> LineTablePatchMap;
   std::unordered_map<const DWARFUnit *, uint64_t> TypeUnitRelocMap;
 
@@ -191,12 +188,6 @@ class DWARFRewriter {
   /// Update stmt_list for CUs based on the new .debug_line \p Layout.
   void updateLineTableOffsets(const MCAssembler &Asm);
 
-  uint64_t getDwoRangesBase(uint64_t DWOId) { return DwoRangesBase[DWOId]; }
-
-  void setDwoRangesBase(uint64_t DWOId, uint64_t RangesBase) {
-    DwoRangesBase[DWOId] = RangesBase;
-  }
-
   using OverriddenSectionsMap = std::unordered_map<DWARFSectionKind, StringRef>;
   /// Output .dwo files.
   void writeDWOFiles(DWARFUnit &, const OverriddenSectionsMap &,
diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp
index 042c39a574561..4ba6344925856 100644
--- a/bolt/lib/Rewrite/DWARFRewriter.cpp
+++ b/bolt/lib/Rewrite/DWARFRewriter.cpp
@@ -719,7 +719,6 @@ void DWARFRewriter::updateDebugInfo() {
       } else {
         TempRangesSectionWriter = LegacyRangesWritersByCU[*DWOId].get();
         RangesBase = RangesSectionWriter->getSectionOffset();
-        setDwoRangesBase(*DWOId, *RangesBase);
       }
 
       updateUnitDebugInfo(*(*SplitCU), DWODIEBuilder, DebugLocDWoWriter,

``````````

</details>


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


More information about the llvm-commits mailing list