[LLVMdev] Metadata

Devang Patel devang.patel at gmail.com
Thu Feb 11 15:34:06 PST 2010


On Thu, Feb 11, 2010 at 9:40 PM, David Greene <dag at cray.com> wrote:
> On Thursday 11 February 2010 15:03:39 Devang Patel wrote:
>
>> > I give up!  What is the syntax for attaching metadata to instructions?
>>
>> Try
>>
>>
>> %r8 = load <2 x double>* %r6, align 16, !nontemporal !1
>> !1 = metadata !{ i32 1, metadata !0, null, metadata !"foobar" }
>
> What does that mean?  "foobar?"  Seems awfully wordy to convey a single
> bit of information.

Here !1 is just an example metadata which has 4 values.

!1 attached to load instruction is an MDNode, which is a collection of
llvm::Values.

-
Devang




More information about the llvm-dev mailing list