I'm trying to add gcoot functionality to my code and I'm confused by why gcroot is assuming to be an i8** I'm using i32 as object and array pointers and if I make them i8 things seem to work. I'm generating IR much like http://llvm.org/docs/GarbageCollection.html#llvm-ir-features void @llvm.gcroot(i8** %ptrloc, i8* %metadata) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150331/e56a0aa2/attachment.html>
LLVM currently lacks a void* equivalent, so i8* is frequently used to mean 'pointer to something'. There's work currently underway to remove types from pointers, so this will become just a generic pointer. David> On 31 Mar 2015, at 08:13, Hayden Livingston <halivingston at gmail.com> wrote: > > I'm trying to add gcoot functionality to my code and I'm confused by why gcroot is assuming to be an i8** > > I'm using i32 as object and array pointers and if I make them i8 things seem to work. > > I'm generating IR much like http://llvm.org/docs/GarbageCollection.html#llvm-ir-features > void @llvm.gcroot(i8** %ptrloc, i8* %metadata) > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Thanks, David. I see. So if I do bitcast i32** to i8** .. I should NOT lose any information or cause an error? It seems like that's what you're implying which is what I was hoping for. On Tue, Mar 31, 2015 at 1:18 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:> LLVM currently lacks a void* equivalent, so i8* is frequently used to mean > 'pointer to something'. There's work currently underway to remove types > from pointers, so this will become just a generic pointer. > > David > > > On 31 Mar 2015, at 08:13, Hayden Livingston <halivingston at gmail.com> > wrote: > > > > I'm trying to add gcoot functionality to my code and I'm confused by why > gcroot is assuming to be an i8** > > > > I'm using i32 as object and array pointers and if I make them i8 things > seem to work. > > > > I'm generating IR much like > http://llvm.org/docs/GarbageCollection.html#llvm-ir-features > > void @llvm.gcroot(i8** %ptrloc, i8* %metadata) > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150331/f1ce5d29/attachment.html>