summaryrefslogtreecommitdiff
path: root/bolt/include
diff options
context:
space:
mode:
authorAlexander Yermolovich <ayermolo@fb.com>2023-01-06 13:45:43 -0800
committerAlexander Yermolovich <ayermolo@fb.com>2023-01-06 13:45:43 -0800
commite22ff52c10d1fdaedc3e24a7884ec215e78eeec4 (patch)
tree6e584dc15be3052277ccd44953564fe49a690fe6 /bolt/include
parent42b1d08b955d6cfa0b78ceca62605bddc905461a (diff)
downloadllvm-e22ff52c10d1fdaedc3e24a7884ec215e78eeec4.tar.gz
[BOLT][DWARF] Change rangelists to use DW_RLE_offset_pair
Before we always used DW_RLE_startx_length. This is not very efficient and leads to bigger .debug_addr section. Changed it to use DW_RLE_base_addressx/DW_RLE_offset_pair. clang-16 build in debug mode llvm-bolt ran on it with --update-debug-sections | section | before | after | diff | % decrease | | .debug_rnglists | 32732292 | 31986051 | -746241 | 2.3% | | .debug_addr | 14415808 | 14184128 | -231680 | 1.6% | Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D140439
Diffstat (limited to 'bolt/include')
-rw-r--r--bolt/include/bolt/Core/DebugData.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bolt/include/bolt/Core/DebugData.h b/bolt/include/bolt/Core/DebugData.h
index 2b79d64ba85b..1d29a871d362 100644
--- a/bolt/include/bolt/Core/DebugData.h
+++ b/bolt/include/bolt/Core/DebugData.h
@@ -170,7 +170,7 @@ public:
std::map<DebugAddressRangesVector, uint64_t> &CachedRanges);
/// Add ranges and return offset into section.
- virtual uint64_t addRanges(const DebugAddressRangesVector &Ranges);
+ virtual uint64_t addRanges(DebugAddressRangesVector &Ranges);
/// Returns an offset of an empty address ranges list that is always written
/// to .debug_ranges
@@ -232,7 +232,7 @@ public:
std::map<DebugAddressRangesVector, uint64_t> &CachedRanges) override;
/// Add ranges and return offset into section.
- uint64_t addRanges(const DebugAddressRangesVector &Ranges) override;
+ uint64_t addRanges(DebugAddressRangesVector &Ranges) override;
std::unique_ptr<DebugBufferVector> releaseBuffer() override {
return std::move(RangesBuffer);