On Mon, Jul 15, 2013 at 5:15 PM, Sandro Magi <[email protected]> wrote:
> On 15/07/2013 3:59 PM, Jonathan S. Shapiro wrote:
>>
>
> Seems they've made some good progress:
> http://llvm.org/docs/GarbageCollection.html#overview-of-available-features
>

When I looked into LLVM's GC support recently, my conclusion was that
the price of doing accurate collection was to preemptively spill all
of your registers to the stack. Or, to put it another way, LLVM will
happily track stack roots but cannot track register roots, so if you
want to do accurate GC, LLVM will keep all of your roots on the stack.

Rust had a plan to add a root-inference pass to LLVM, which would be
run after register-based optimizations. From what I gather, they've
abandoned that approach, and I *think* that their current work is
towards collector that is conservative on the stack and in registers
but precise on the heap. I believe Mono takes the same approach. From
[http://www.mono-project.com/Compacting_GC]: "Currently the stack and
register contents are scanned conservatively (the CPU registers are
copied into a small buffer of memory that has been registered as a
root block of memory that is to be scanned conservatively)."

The LLVM maintainers do not seem very keen on trying to keep track of
GC roots in registers.

-Jon
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to