[PATCH] D61940: [DebugInfo] Don't always extend variable locations when the reg location is unchanging
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 15:19:33 PDT 2019
aprantl added subscribers: jingham, jasonmolenda.
aprantl added a comment.
> My understanding is that we deliberately don't terminate stack-based variable locations during frame destruction, because the debugger should understand that those become invalid as the frame is destroyed.
CC'ing @jasonmolenda and @jingham to double-check that statement.
================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:265
// non-CSRs.
- for (unsigned I : ChangingRegs.set_bits()) {
- // Don't consider SP to be clobbered by register masks.
- if (unsigned(I) != SP && TRI->isPhysicalRegister(I) &&
- MO.clobbersPhysReg(I)) {
- clobberRegisterUses(RegVars, I, DbgValues, LiveEntries, MI);
- }
+ SmallVector<unsigned, 8> RegsToClobber;
+ // Don't consider SP to be clobbered by register masks.
----------------
My intuition says that your typical function call will clobber more than 8 registers, but I don't know what a good number is either.
================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:282
if (MI.isDebugValue()) {
assert(MI.getNumOperands() > 1 && "Invalid DBG_VALUE instruction!");
----------------
For readability it might be a good idea to move the short cases to the top, with a `continue`, then we have more horizontal space for the meat of the function.
================
Comment at: test/DebugInfo/AArch64/struct_by_value.ll:3
+; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s
+; REQUIRES: object-emission
----------------
Thanks! Feel free to land this ahead of time as an NFC commit.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61940/new/
https://reviews.llvm.org/D61940
More information about the llvm-commits
mailing list