[libunwind] Delete unused codeOffsetAtStackDecrement/registersInOtherRegisters/sameValueUsed

ld64 uses them to create compact unwind from DWARF call frame information.
When the code was ported to libunwind, the variables were not deleted.

Reviewed By: #libunwind, compnerd

Differential Revision: https://reviews.llvm.org/D91039
This commit is contained in:
Fangrui Song 2020-11-09 10:19:12 -08:00
parent c8cd7e2bbf
commit 2c481f128c
1 changed files with 0 additions and 9 deletions

View File

@ -88,9 +88,6 @@ public:
int32_t cfaRegisterOffset; // CFA = (cfaRegister)+cfaRegisterOffset
int64_t cfaExpression; // CFA = expression
uint32_t spExtraArgSize;
uint32_t codeOffsetAtStackDecrement;
bool registersInOtherRegisters;
bool sameValueUsed;
RegisterLocation savedRegisters[kMaxRegisterNumber + 1];
enum class InitializeTime { kLazy, kNormal };
@ -521,8 +518,6 @@ bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace,
// value has not changed, so no need to restore from frame.
// We model this as if the register was never saved.
results->setRegisterLocation(reg, kRegisterUnused, initialState);
// set flag to disable conversion to compact unwind
results->sameValueUsed = true;
_LIBUNWIND_TRACE_DWARF("DW_CFA_same_value(reg=%" PRIu64 ")\n", reg);
break;
case DW_CFA_register:
@ -540,8 +535,6 @@ bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace,
}
results->setRegister(reg, kRegisterInRegister, (int64_t)reg2,
initialState);
// set flag to disable conversion to compact unwind
results->registersInOtherRegisters = true;
_LIBUNWIND_TRACE_DWARF(
"DW_CFA_register(reg=%" PRIu64 ", reg2=%" PRIu64 ")\n", reg, reg2);
break;
@ -598,7 +591,6 @@ bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace,
case DW_CFA_def_cfa_offset:
results->cfaRegisterOffset =
(int32_t)addressSpace.getULEB128(p, instructionsEnd);
results->codeOffsetAtStackDecrement = (uint32_t)codeOffset;
_LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_offset(%d)\n",
results->cfaRegisterOffset);
break;
@ -662,7 +654,6 @@ bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace,
results->cfaRegisterOffset =
(int32_t)(addressSpace.getSLEB128(p, instructionsEnd) *
cieInfo.dataAlignFactor);
results->codeOffsetAtStackDecrement = (uint32_t)codeOffset;
_LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_offset_sf(%d)\n",
results->cfaRegisterOffset);
break;