[PATCH] D70752: LowerDbgDeclare: look through bitcasts.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 15:14:47 PST 2019
eugenis added a comment.
I also find worklist a more common and recognizable pattern, but I don't mind recursion either.
Btw, this function terribly incomplete. This is not the only case when it destroys perfectly good debug info. For example, storing an address of a local variable to memory does not generate a dbg.value. In the following example "y" has no location at -O3:
int *p;
void publish_and_wait();
void f() {
int y;
p = &y;
publish_and_wait();
}
I'm looking at this because HWASan tries to use debug info to recover stack frame layout at run time. This works as long as we get at least one frame pointer based location for a non-promoted variable. I'm considering disabling this optimization altogether in functions with sanitize_hwaddress attribute; or maybe adding a dbg.value with DW_OP_deref to all allocas in such functions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70752/new/
https://reviews.llvm.org/D70752
More information about the llvm-commits
mailing list