[PATCH] D120732: [DebugInfo][InstrRef] Prefer stack locations for variables over restored registers

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 15:47:35 PST 2022


dblaikie added a comment.

In D120732#3353016 <https://reviews.llvm.org/D120732#3353016>, @jmorse wrote:

> A sample of things are D63083 <https://reviews.llvm.org/D63083>, https://bugs.llvm.org/show_bug.cgi?id=40188#c8 , D61940 <https://reviews.llvm.org/D61940>. Although looking back, they all appear to be about not making complicated location-list entries in the prologue, rather than the epilogue.

Doing it in either place seems wasteful to me. The broad logic is: At -O0 we manage to succeed by using a stack-only location, which seems to imply that the consumers don't try to use that location in the prologue or epilogue (since the stack would be wrong in parts of those regions). So when we do more fine-grained locations, I think the same logic should apply and we shouldn't try to be accurate in those areas - and choose whatever representation is easy to generate and/or dense/efficient to encode. Does that seem reasonable/make sense?


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

https://reviews.llvm.org/D120732



More information about the llvm-commits mailing list