[LLVMdev] Garbage collection
Jon Harrop
jon at ffconsultancy.com
Sat Feb 28 06:50:42 PST 2009
On Saturday 28 February 2009 02:52:21 Gordon Henriksen wrote:
> On 2009-02-27, at 19:58, Jon Harrop wrote:
> > However, that means my roots are now aggregate values. So your
> > proposed GC
> > infrastructure for LLVM would need to be able to mark aggregate
> > values as
> > roots as well as individual values. Moreover, even if we went
> > through all
> > this work of improving LLVM to support this GC infrastructure and
> > altering my
> > VM to traverse the system stack instead of my current shadow stack,
> > I am not
> > even convinced it would be a significant improvement over what I
> > already
> > have.
>
> I agree you likely won't see any significant overhead reduction vs.
> your current implementation unless you adopt a copying collector.
I was saying that I do not believe I will see a significant improvement if I
do adopt a copying collector.
> > Can you elaborate on a changing of the type hierarchy?
>
> I've considered introducing a separate GCPointer type.
Would that be able to handle aggregate GC reference types?
> > I just cannot see how the GC-handling code can be isolated in such a
> > way that
> > the result is better than just having separate HLVMs for separate
> > design
> > decisions.
>
> I simply suggest you group functions to 'emit read barrier', 'allocate
> GC root', and soforth together in your compiler such that they can be
> easily changed or updated in one place if it proves necessary.
I already have that but it is only a tiny part of supporting different GC
designs. For example, it knows nothing of sync points.
--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e
More information about the llvm-dev
mailing list