[PATCH] D64971: [SafeStack] Don't re-insert derefs for allocas in debug info

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 10:23:31 PDT 2019


probinson added a comment.

In D64971#1593796 <https://reviews.llvm.org/D64971#1593796>, @vsk wrote:

> AFAICT the deref is always needed here: my understanding is that dbg.value has to describe the actual value of a variable, not its address (https://www.llvm.org/docs/LangRef.html#diexpression). I admit that keeping the deref may break the dwarf builder, but istm that indicates a bug in the dwarf builder.


So the deref ought to go after the arithmetic, and not before.  Then someplace that knows the difference between values and locations can remove the deref so the resulting expression is ultimately correct in the DWARF?

(I though Reid was going to invent dbg.addr and solve all this nonsense for us...)


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64971





More information about the llvm-commits mailing list