Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bolt
diff options
context:
space:
mode:
authorAlexander Yermolovich <ayermolo@fb.com>2022-02-23 00:26:38 +0300
committerAlexander Yermolovich <ayermolo@fb.com>2022-02-23 00:28:15 +0300
commit210bb04e23429fe9f79c4c83c7df450a0c3250c5 (patch)
treec80796d25cf07fe20c6a1773d1c95b19e9c35a26 /bolt
parent746bd890002826a5663d241e3dc2140c2f3a3cdd (diff)
[BOLT][DWARF] Remove patchLowHigh unused function.
Cleanup after removing caching mechanims for ranges/abbrevs. Reviewed By: rafauler, yota9 Differential Revision: https://reviews.llvm.org/D120174
Diffstat (limited to 'bolt')
-rw-r--r--bolt/include/bolt/Rewrite/DWARFRewriter.h5
-rw-r--r--bolt/lib/Rewrite/DWARFRewriter.cpp41
2 files changed, 0 insertions, 46 deletions
diff --git a/bolt/include/bolt/Rewrite/DWARFRewriter.h b/bolt/include/bolt/Rewrite/DWARFRewriter.h
index 2b0888c2329d..74e10b146c53 100644
--- a/bolt/include/bolt/Rewrite/DWARFRewriter.h
+++ b/bolt/include/bolt/Rewrite/DWARFRewriter.h
@@ -147,11 +147,6 @@ class DWARFRewriter {
SimpleBinaryPatcher &DebugInfoPatcher,
Optional<uint64_t> RangesBase = None);
- /// Patch DW_AT_(low|high)_pc values for the \p DIE based on \p Range.
- void patchLowHigh(DWARFDie DIE, DebugAddressRange Range,
- SimpleBinaryPatcher &DebugInfoPatcher,
- Optional<uint64_t> DWOId);
-
/// Helper function for creating and returning per-DWO patchers/writers.
template <class T, class Patcher>
Patcher *getBinaryDWOPatcherHelper(T &BinaryPatchers, uint64_t DwoId) {
diff --git a/bolt/lib/Rewrite/DWARFRewriter.cpp b/bolt/lib/Rewrite/DWARFRewriter.cpp
index 40d43bf858f8..df4e3d2ecf73 100644
--- a/bolt/lib/Rewrite/DWARFRewriter.cpp
+++ b/bolt/lib/Rewrite/DWARFRewriter.cpp
@@ -1364,47 +1364,6 @@ void getRangeAttrData(DWARFDie DIE, Optional<AttrInfo> &LowPCVal,
} // namespace
-void DWARFRewriter::patchLowHigh(DWARFDie DIE, DebugAddressRange Range,
- SimpleBinaryPatcher &DebugInfoPatcher,
- Optional<uint64_t> DWOId) {
- Optional<AttrInfo> LowPCVal = None;
- Optional<AttrInfo> HighPCVal = None;
- getRangeAttrData(DIE, LowPCVal, HighPCVal);
- uint64_t LowPCOffset = LowPCVal->Offset;
- uint64_t HighPCOffset = HighPCVal->Offset;
- auto *TempDebugPatcher = &DebugInfoPatcher;
- if (LowPCVal->V.getForm() == dwarf::DW_FORM_GNU_addr_index) {
- uint32_t AddressIndex =
- AddrWriter->getIndexFromAddress(Range.LowPC, *DWOId);
- TempDebugPatcher = getBinaryDWODebugInfoPatcher(*DWOId);
- TempDebugPatcher->addUDataPatch(LowPCOffset, AddressIndex, LowPCVal->Size);
- // 2.17.2
- // If the value of the DW_AT_high_pc is of class address, it is the
- // relocated address of the first location past the last instruction
- // associated with the entity; if it is of class constant, the value is
- // an unsigned integer offset which when added to the low PC gives the
- // address of the first location past the last instruction associated
- // with the entity.
- if (!HighPCVal->V.isFormClass(DWARFFormValue::FC_Constant)) {
- AddressIndex = AddrWriter->getIndexFromAddress(Range.HighPC, *DWOId);
- TempDebugPatcher->addUDataPatch(HighPCOffset, AddressIndex,
- HighPCVal->Size);
- }
- } else {
- TempDebugPatcher->addLE64Patch(LowPCOffset, Range.LowPC);
- }
-
- uint64_t HighPC = Range.HighPC;
- // The DW_FORM_data* is delta between high and low pc
- if (HighPCVal->V.getForm() != dwarf::Form::DW_FORM_addr)
- HighPC -= Range.LowPC;
-
- if (isHighPcFormEightBytes(HighPCVal->V.getForm()))
- TempDebugPatcher->addLE64Patch(HighPCOffset, HighPC);
- else
- TempDebugPatcher->addLE32Patch(HighPCOffset, HighPC);
-}
-
void DWARFRewriter::convertToRangesPatchAbbrev(
const DWARFUnit &Unit, const DWARFAbbreviationDeclaration *Abbrev,
DebugAbbrevWriter &AbbrevWriter, Optional<uint64_t> RangesBase) {