[llvm-commits] [llvm] r90788 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h include/llvm/IntrinsicInst.h include/llvm/Intrinsics.td lib/Analysis/DebugInfo.cpp
Devang Patel
devang.patel at gmail.com
Mon Dec 7 11:54:07 PST 2009
Hi Victor,
On Mon, Dec 7, 2009 at 11:36 AM, Victor Hernandez <vhernandez at apple.com> wrote:
> Author: hernande
> Date: Mon Dec 7 13:36:34 2009
> New Revision: 90788
>
> URL: http://llvm.org/viewvc/llvm-project?rev=90788&view=rev
> Log:
> Introduce the "@llvm.dbg.value" debug intrinsic.
>
> The semantics of llvm.dbg.value are that starting from where it is executed, an offset into the specified user source variable is specified to get a new value.
>
> An example:
> call void @llvm.dbg.value(metadata !{ i32 7 }, i64 0, metadata !2)
> Here the user source variable associated with metadata #2 gets the value "i32 7" at offset 0.
>
>
> Modified:
> llvm/trunk/include/llvm/Analysis/DebugInfo.h
> llvm/trunk/include/llvm/IntrinsicInst.h
> llvm/trunk/include/llvm/Intrinsics.td
> llvm/trunk/lib/Analysis/DebugInfo.cpp
>
> Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=90788&r1=90787&r2=90788&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
> +++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Mon Dec 7 13:36:34 2009
> @@ -492,6 +492,7 @@
>
> const Type *EmptyStructPtr; // "{}*".
> Function *DeclareFn; // llvm.dbg.declare
> + Function *ValueFn; // llvm.dbg.value
>
> DIFactory(const DIFactory &); // DO NOT IMPLEMENT
> void operator=(const DIFactory&); // DO NOT IMPLEMENT
> @@ -639,6 +640,13 @@
> Instruction *InsertDeclare(llvm::Value *Storage, DIVariable D,
> Instruction *InsertBefore);
>
> + /// InsertValue - Insert a new llvm.dbg.value intrinsic call.
> + Instruction *InsertValue(llvm::Value *V, llvm::Value *Offset,
> + DIVariable D, BasicBlock *InsertAtEnd);
> +
> + /// InsertValue - Insert a new llvm.dbg.value intrinsic call.
> + Instruction *InsertValue(llvm::Value *V, llvm::Value *Offset,
> + DIVariable D, Instruction *InsertBefore);
Here Value is overloaded term. Pl. rename this as
InsertDbgValueIntrinsic to clarify what this DebugInfo API is doing.
Thanks,
-
Devang
More information about the llvm-commits
mailing list