On Thu, Feb 11, 2010 at 8:50 PM, David Greene <dag at cray.com> wrote:> > So I tried a bunch of things: > > %r8 = load <2 x double>* %r6, align 16, metadata !"nontemporal" > %r8 = load <2 x double>* %r6, align 16, metadata !nontemporal > %r8 = load <2 x double>* %r6, align 16, !{ metadata !"nontemporal" } > %r8 = load <2 x double>* %r6, align 16, !{ metadata !nontemporal } > %r8 = load <2 x double>* %r6, align 16, !{ !"nontemporal" } > %r8 = load <2 x double>* %r6, align 16, !{ !nontemporal } > > 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" } - Devang
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. -Dave
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