[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
Fri May 24 05:49:29 PDT 2019


jmorse updated this revision to Diff 201204.
jmorse added a comment.

Bjorn wrote:

> Is the intention to change the behavior for prologues as well here? The description mentions that we do a different analysis for the epilogues. But with this patch we no longer ignore register clobbering for "FrameSetup" (collectChangingRegs used to ignore FrameSetup code).
> 
> Maybe that is a good thing (just not obvious when reading the description that this patch also treats prologues differently).

Oooo, I'd missed that part, good spot. However when adding insensitivity-to-prologues into this patch, it causes a change in behaviour -- fpo-shrink-wrap.ll now extends a stack location through the whole of a prologue, where it previously terminated after the first 'push'. (The change manifests as one fewer temporary labels).

IMO this is an improvement in the output, and what ChangingRegs was _supposed_ to detect. It's not completely clear why it didn't before. AFAIUI, FrameSetup is more widely supported, and so it doesn't need to be rolled into the subsequent patch?


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/COFF/fpo-shrink-wrap.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.201204.patch
Type: text/x-patch
Size: 14236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190524/b469851e/attachment.bin>


More information about the llvm-commits mailing list