search for: rootptr

Displaying 4 results from an estimated 4 matches for "rootptr".

2017 Nov 01
2
llvm.gcroot trouble with non-i8* allocas
...; { entry: %objptr = alloca i8* call void @llvm.gcroot(i8** %objptr, i8* null) store i8* %x, i8** %objptr %v = load i8*, i8** %objptr ret i8* %v } However, when I have this: define { i8*, i32 } @foo({ i8*, i32 } %x) gc "shadow-stack" { entry: %objptr = alloca { i8*, i32 } %rootptr = bitcast { i8*, i32 }* %objptr to i8** call void @llvm.gcroot(i8** %rootptr, i8* null) store { i8*, i32 } %x, { i8*, i32 }* %objptr %v = load { i8*, i32 }, { i8*, i32 }* %objptr ret { i8*, i32 } %v } llc says: llvm.gcroot parameter #1 must either be a pointer alloca, or argument #2 must b...
2017 Nov 01
0
llvm.gcroot trouble with non-i8* allocas
...croot(i8** %objptr, i8* null) > store i8* %x, i8** %objptr > %v = load i8*, i8** %objptr > ret i8* %v > } > > However, when I have this: > > define { i8*, i32 } @foo({ i8*, i32 } %x) gc "shadow-stack" { > entry: > %objptr = alloca { i8*, i32 } > %rootptr = bitcast { i8*, i32 }* %objptr to i8** > call void @llvm.gcroot(i8** %rootptr, i8* null) > store { i8*, i32 } %x, { i8*, i32 }* %objptr > %v = load { i8*, i32 }, { i8*, i32 }* %objptr > ret { i8*, i32 } %v > } > > llc says: llvm.gcroot parameter #1 must either be a poi...
2006 Mar 14
0
[LLVMdev] Re: Garbage collection questions
...refcnt_dec(obj); *FieldPtr = V; refcnt_inc(V); } } /*===----------------------------------------------------------------------===** * FIXME: This should be in a code-generator specific library, but for now this * will work for all code generators. */ typedef struct GCRoot { void **RootPtr; void *Meta; } GCRoot; typedef struct GCRoots { struct GCRoots *Next; unsigned NumRoots; GCRoot RootRecords[]; } GCRoots; GCRoots *llvm_gc_root_chain; void llvm_cg_walk_gcroots(void (*FP)(void **Root, void *Meta)) { GCRoots *R = llvm_gc_root_chain; for (; R; R = R->Next) { unsi...
2006 Mar 14
3
[LLVMdev] Re: Garbage collection questions
Again, sorry for the delay. :( On Thu, 9 Mar 2006, Sandro Magi wrote: > I've written a reference-counting garbage collector for LLVM, but I'm > still unclear on a few things. Cool! > The following piece of code that appears on > http://llvm.cs.uiuc.edu/docs/GarbageCollection.html is unclear: > > ;; As the pointer goes out of scope, store a null value into > ;;