[LLVMdev] GC questions.

Chris Lattner sabre at nondot.org
Sun Jul 25 17:46:15 PDT 2004

On Sun, 25 Jul 2004, Tobias Nurmiranta wrote:

> On Thu, 22 Jul 2004, Chris Lattner wrote:
> > On Thu, 22 Jul 2004, Tobias Nurmiranta wrote:
> > > Hmm, it felt nicer to mark raw LLVM pointers as roots and then transform
> > > them, since I then didn't have to see the overhead in my frontend :).
> >
> > I'm not sure what overhead you mean.
> I think I should have emphasized "felt", since it only would make me
> produce less code in the frontend :). But I think my transformation
> thing won't work, so I'll do as the other front-ends, but thanks for the
> feedback to my thoughts!


> > I don't understand what the benefit of this would be.  The problem is that
> > once dynamically assigned, an SSA value cannot change its contents until
> > it is redefined by the same definition.  Tracking GC information at every
> > instruction would not be able to address this fundamental problem.
> This is regarding every machine instruction, not llvm-instruction, with
> the benefit that the threads don't have to fixed to gc-safe points at
> gc invocation. But maybe it's not worth the work.

That's a good point, but there is a big cost.  In particular, it's
somewhat infeasible for a static compiler to generate maps for every
instruction: it's very complex (from an engineering standpoint) and
results in large maps.  At some point, it might be interesting for someone
to experiment with this approach (and the results could be interesting!),
but it is not going to be me. :)



More information about the llvm-dev mailing list