[llvm-commits] embedded metadata preview

Nick Lewycky nicholas at mxc.ca
Sat Mar 14 01:45:07 PDT 2009


I took a stab at implementing embedded metadata. The idea is to allow 
LLVM's user to attach meaningful data to the instruction stream that 
isn't really relevant to the execution of the instructions. This comes 
from Chris' notes:

   http://nondot.org/sabre/LLVMNotes/EmbeddedMetadata.txt

which I deviated a little. The major thing missing from this patch is 
any verifier support. My current plan is to add support to the verifier 
for ensuring that MDNode and MDString are only used from a) initializers 
to globals named starting with "llvm." b) calls to intrinsic functions, 
then commit it.

The attached patch implements MDString and MDNode as new types of 
Constant, .ll/.bc reader/writer support and a LangRef update. I'd 
appreciate any review comments!

Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: emb-md.patch
Type: text/x-diff
Size: 19741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090314/3e1a238e/attachment.patch>


More information about the llvm-commits mailing list