[LLVMdev] Replacement for findStopPoint() in LLVM 2.7

Devang Patel devang.patel at gmail.com
Tue Mar 16 11:15:50 PDT 2010


>> For LLVM Value *s, I'm not sure how to get the debug information if they
>> come from alloca instructions.  Is the best option to look for a use of
>> the Value in a llvm.dbg.declare() call and then grab the debug metadata
>> from that?

Now llvm.dbg.declare() uses metadata, so it won't show up in uses list
for the Value. This is done to ensure that debug info does not
influence optimizer. You need to check all llvm.dbg.declare
intrinsics' operands' elements.

> I wasn't following the dbg.declare changes, but I think there is a
> llvm.dbg.value now that survives mem2reg (or rather it is dbg.declare
> initially and becomes dbg.value later).

lllvm.dbg.declare is transformed into llvm.dbg.value when alloca disappears.

-
Devang




More information about the llvm-dev mailing list