[LLVMdev] Garbage collection: Multiple copies of a root

Gordon Henriksen gordonhenriksen at me.com
Fri Mar 20 05:09:55 PDT 2009


On 2009-03-20, at 05:09, Harmen van der Spek wrote:

> The problem is that we want to implement some sort of copying  
> garbage collector. In this case, the roots on the stack must be  
> updated. However, if this root is also stored in an IR register,  
> then this pointer should be updated as well. Is there support for  
> identifying and updating such references in the GC framework, or  
> should we generate code ourselves to reload the updated references  
> from the stack.

You should generate code to reload the registers from the stack for  
now. We'd ultimately like to move to a model where LLVM automatically  
inserts the reloads, only as necessary, but are not there yet.

— Gordon



More information about the llvm-dev mailing list