[PATCH] D70752: LowerDbgDeclare: look through bitcasts.
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 16:28:40 PST 2019
vsk added subscribers: jmorse, bjope, dstenb.
vsk added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1448
+ if (BI->getType()->isPointerTy())
+ WorkList.push_back(BI);
+ }
----------------
Yeah, this is also giving up on chasing GEPs. PtrUseVisitor has a facility to follow GEPs and figure out the accumulated offset, so we could try to emit:
```
%a = alloca
%g = gep %a, 0, 4
store i32 %val, %g
; emit: dbg.value(%val, <var>, DIExpression(OP_LLVM_fragment 32 32))
```
It's certainly a larger change, so I wouldn't be opposed to landing a narrow fix for now, but perhaps that's an interesting future direction.
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