[PATCH] D61940: [DebugInfo] Don't always extend variable locations when the reg location is unchanging

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 06:59:25 PDT 2019


jmorse updated this revision to Diff 200939.
jmorse marked 2 inline comments as done.
jmorse added a comment.

With this update I've separated the FrameDestroy portion from the rest of the patch. The result is that debug-loc-offset.mir and pr19307.mir are marked XFAIL, as the locations they check no longer extend through the frame-destroy'd part of the produced code. I'll upload the remaining part of the patch in a moment, that adds in use of the frame-destroy flag and un-xfails those tests.

Looking through in-tree backends, only X86, AArch64 and RISC-V actually set FrameDestroy. Nevertheless I think FrameDestroy is still something we should make use of: if the assumption I stated above still holds (we deliberately let stack locations run through frame destruction), then we can only detect frame destruction if the backend tells us where it is. The failure-case is that variable locations end slightly earlier than necessary, and we might get fewer single-value variable locations. An acceptable trade-off IMHO.

I ran check-llvm with LLVM_DEFAULT_TARGET_TRIPLE="arm-none-eabi" to check that no generic tests on a non-frame-destroy backend get hit by this change.

Note that this will still leave inlined-argument.ll XFailed, as I don't believe our current implementation can soundly produce the correct output anyway.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61940/new/

https://reviews.llvm.org/D61940

Files:
  lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
  test/DebugInfo/AArch64/inlined-argument.ll
  test/DebugInfo/AArch64/struct_by_value.ll
  test/DebugInfo/X86/debug-loc-offset.mir
  test/DebugInfo/X86/pr19307.mir
  test/DebugInfo/X86/reference-argument.ll
  test/DebugInfo/X86/stack-value-piece.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61940.200939.patch
Type: text/x-patch
Size: 13792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190523/cdda7319/attachment.bin>


More information about the llvm-commits mailing list