[PATCH] D37768: [IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 15:17:13 PDT 2017


aprantl added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1101
 /// Inserts a llvm.dbg.value intrinsic before a store to an alloca'd value
 /// that has an associated llvm.dbg.decl intrinsic.
+void llvm::ConvertDebugDeclareToDebugValue(DbgInfoIntrinsic *DII,
----------------
`llvm.dbg.decl`?

Either the comment is not up to date, or the signature shouldn't change.
Side-note: the comment should also be moved into the header.


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1143
 /// Inserts a llvm.dbg.value intrinsic before a load of an alloca'd value
 /// that has an associated llvm.dbg.decl intrinsic.
+void llvm::ConvertDebugDeclareToDebugValue(DbgInfoIntrinsic *DII,
----------------
ditto


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1237
+/// 'V' points to. This may include a mix of dbg.declare and
+/// dbg.addr intrinsics.
+TinyPtrVector<DbgInfoIntrinsic *> llvm::FindDbgAddrUses(Value *V) {
----------------
move comment into header
`/// Finds all llvm.dbg.declare and llvm.debug.addr intrinsics describing local variables ...`


================
Comment at: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:106
   Value *AllocaPointerVal;
-  DbgDeclareInst *DbgDeclare;
+  TinyPtrVector<DbgInfoIntrinsic*> DbgDeclares;
 
----------------
aprantl wrote:
> These are no longer just dbg.declares, are they?
ping


================
Comment at: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:948
 
       DenseMap<AllocaInst *, unsigned>::iterator ai = AllocaLookup.find(Dest);
       if (ai == AllocaLookup.end())
----------------
NFC follow-up to make this into
`auto AI` ?


https://reviews.llvm.org/D37768





More information about the llvm-commits mailing list