I’ve been tinkering around with some llvm assembly trying out some of the GC related features. When I add a call to @llvm.gcroot, it is consistently acting like it doesn’t know what that function is. I’m just getting started so it is probably something small and simple but some googling didn’t yield much in the way of an answer. Any help is appreciated. Thanks, Todd ---------------------------------------------------- llvm-as: test1.s:12:13: error: use of undefined value '@llvm.gcroot' call void @llvm.gcroot(i8** %p, i8* null) define void @foo() gc "tgc" { %p = alloca i8*, align 4 %1 = load i8** %p, align 4 call void @llvm.gcroot(i8** %p, i8* null) ret void } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110608/931d255e/attachment.html>
On 8 June 2011 17:20, Anderson, Todd A <todd.a.anderson at intel.com> wrote:> I’ve been tinkering around with some llvm assembly trying out some of the > GC related features. When I add a call to @llvm.gcroot, it is consistently > acting like it doesn’t know what that function is. I’m just getting started > so it is probably something small and simple but some googling didn’t yield > much in the way of an answer. Any help is appreciated. >Intrinsic functions still need declarations. If you take a look at http://llvm.org/docs/LangRef.html#int_gcroot and copy the declaration listed under "syntax" to the top of your .ll file, then it will assemble with llvm-as. Nick ****> > ** Thanks, > > ** ** > > Todd**** > > ** ** > > ----------------------------------------------------**** > > ** ** > > llvm-as: test1.s:12:13: error: use of undefined value '@llvm.gcroot'**** > > call void @llvm.gcroot(i8** %p, i8* null)**** > > ** ** > > define void @foo() gc "tgc" {**** > > %p = alloca i8*, align 4**** > > %1 = load i8** %p, align 4**** > > call void @llvm.gcroot(i8** %p, i8* null)**** > > ret void**** > > }**** > > _______________________________________________ > 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/20110608/ab776081/attachment.html>
Okay. Thanks. I got past that problem and on to the next. I've been trying to create a loadable GC module. I used the example makefile in the LLVM GC doc. This is with llvm-2.9 and Cygwin 1.7.9. make reports that the compile succeeded and that it was linking a release loadable module with a dll extension. However, when you look in the Release directory, all that is there is a .o file. I have the LOADABLE_MODULE variable set to 1 in the makefile. It is also strange that it was complaining about unresolved references during the link step...shouldn't those be resolved at load time? Thanks, Todd Ø On 8 June 2011 17:20, Anderson, Todd A <todd.a.anderson at intel.com<mailto:todd.a.anderson at intel.com>> wrote: Ø I've been tinkering around with some llvm assembly trying out some of the GC related features. When I add a call to @llvm.gcroot, it is consistently acting like it doesn't know what that function is. I'm just getting started so it is probably something small and simple but some googling didn't yield much in the way of an answer. Any help is appreciated. Ø Intrinsic functions still need declarations. If you take a look at http://llvm.org/docs/LangRef.html#int_gcroot and copy the declaration listed under "syntax" to the top of your .ll file, then it will assemble with llvm-as. Ø Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110616/73388f32/attachment.html>