[PATCH] D23283: Debugging of optimized code: When locals have their address taken as part of a call use their stack slots as location expressions for debug info.
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 10:04:49 PDT 2016
aprantl added a comment.
Thanks!
Why does this need to be restricted to "simple" derefs? I understand that it's easier to convince ourselves that a single DW_OP_deref is correct, but do you have a counterexample where checking whether the first opcode in the expression is a deref would not be correct?
I haven't checked the code yet, but maybe you already know the answer: Does this also work if the variable has more than one value? If the FrameIndexDbgValue also gets lowered into DBG_VALUE we should be fine. If it ends up as a stack slot entry in the MMI table the following example should break:
void foo(bool c) {
int i = 0;
if (c)
i = 1;
else
bar(&i)
return i;
}
https://reviews.llvm.org/D23283
More information about the llvm-commits
mailing list