[LLVMdev] LLVM Value relationship with metadata
David Chisnall
David.Chisnall at cl.cam.ac.uk
Mon Nov 5 00:10:34 PST 2012
On 5 Nov 2012, at 07:07, Arsen wrote:
> Would anybody explain why there is not direct connection between llvm::Value
> and metadata nodes. If llvm::Value hold pointer to its MDNode would it cause
> any malfunctioning?
The rationale was that most values did not have any metadata, and therefore there would be a space penalty paid for every node. Increasingly, it seems that nodes have several metadata nodes and so they are all paying the time penalty for the lookup. It is probably worth doing some profiling to see what the costs are. At low optimisation levels, there is a lot of debug metadata. At higher ones, there is a lot of TBAA metadata.
David
More information about the llvm-dev
mailing list