[LLVMdev] DebugInfo and Metadata Store

Nick Lewycky nicholas at mxc.ca
Thu Nov 26 14:31:58 PST 2009


Hi Devang,

Before I get to the contents of this particular patch, I have a 
higher-level design question. Why is metadata stored off the 
LLVMContext? That seems like the wrong place to me, this data is all 
specific to the particular module. Specifically, a single MDNode may not 
cross modules, and if a module is destroyed we should eliminate all the 
metadata that came with it.

So, why MetadataContext at all?

Nick

Devang Patel wrote:
> Hi All,
>
> Now, in llvm trunk we support custom metadata, which can be attached
> with llvm instructions. One of the user is "debugging information".
> This user is special (not just because it is in llvm svn tree:)
> because whenever debug info is available, it is likely that
> corresponding metadata is attached with almost all instructions. In
> other words, usually it is all or nothing. This means, using Metadata
> Store to access debugging information attached with each llvm
> instruction is expensive, in terms of compile time. If debugging
> information is directly stored inside llvm::Instruction then it speeds
> up compile time. In my measurements this speeds up LLVMContext.cpp
> compile time (-O0 -g) by almost 10%. I do not see any strong reason to
> give up this gain.
>
> Thoughts ? I am attaching tentative patch with this email.
> -
> Devang
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list