[LLVMdev] Interfacing llvm with a precise, relocating GC

Andrew Trick atrick at apple.com
Thu Oct 24 14:56:16 PDT 2013


On Oct 24, 2013, at 2:50 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:

> On 24 October 2013 17:32, Sanjoy Das <sanjoy at azulsystems.com> wrote:
>> Hello llvm-dev!
>> 
>> My colleages and I are currently evaluating llvm's suitability as a
>> JIT compiler interfacing with a precise, relocating garbage collector.
>> While we couldn't find code or writeups that deal with the issues
>> specific to this design goal, it is entirely possible that we may have
>> missed something; we would appreciate references to relevant code or
>> writeups that people on this list may be aware of.
> 
> 
> This would be hard. Currently what we have support for is a non-moving
> GC where all the roots are in memory. Adding support for a non-moving
> gc with register roots would not be too hard and might be possible to
> reuse some of the recent stackmap work.
> 
> For a moving GC you would probably have to change how we represent
> pointer arithmetic in the selection dag and MI. It would be quiet a
> big change. CCIng Andy and Patrick since they might have an idea of
> how much work that would be and what the costs and benefits for LLVM
> are.

100% agreement.

> Also to note is that there are plans to move away from selection dag,
> so it might be good to sync this work with whatever we end up using
> instead.

FYI: when this was talked about, I heard mention that GEPs should be lowered early in the IR->MI pipeline. I didn’t hear any ideas that would make derived pointer tracking easier.

-Andy



More information about the llvm-dev mailing list