Author: Fangrui Song Date: 2020-11-09T10:19:12-08:00 New Revision: 2c481f128cad043498dc404bc7f6d6128bb7c223
URL: https://github.com/llvm/llvm-project/commit/2c481f128cad043498dc404bc7f6d6128bb7c223 DIFF: https://github.com/llvm/llvm-project/commit/2c481f128cad043498dc404bc7f6d6128bb7c223.diff LOG: [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 Added: Modified: libunwind/src/DwarfParser.hpp Removed: ################################################################################ diff --git a/libunwind/src/DwarfParser.hpp b/libunwind/src/DwarfParser.hpp index 4bfd0451ed5a..de0eb6de9d70 100644 --- a/libunwind/src/DwarfParser.hpp +++ b/libunwind/src/DwarfParser.hpp @@ -88,9 +88,6 @@ class CFI_Parser { 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; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits