On Sep 12, 2007, at 11:14 AM, Gordon Henriksen wrote: > Hm. Are you sure this is wise? I realize my patch didn't provide > root initialization, but I have that fixed locally. Without > liveness analysis, leaving stack roots uninitialized seems unwise, > since gc points are not entirely predictable from the IR.
I think it is fine. trivially, any front-end that produced a call to the gcroot intrinsic could emit that intrinsic and a store of null, so there is no power lost here. The reason it is useful is for things like this (C syntax): void foo(object *P) { gcroot(&P, 0); ... use P ... } when converted to LLVM, this turns into the equivalent of: void foo(object *P) { P_addr = alloca object* store P -> P_addr gcroot(P_addr, 0); ... use *P_addr... } With the null'ing property of gcroot, it would clobber the live in value. -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits