[llvm-dev] [GC / Statepoints] Collector supports only base pointers as stack roots

Philip Reames via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 4 09:27:26 PST 2016


Fundamentally, the optimizer expects to be able to introduce derived 
pointers (both interior and exterior) in the form of GEPs.  This is 
unavoidable.

If you collector is non-relocating, you can simply ignore the derived 
portion of the relocation record.  We report both the base pointer and 
the derived pointer for each derived pointer.  If you take all the 
reported base pointers, then unique the set, you should have all of the 
objects you need to report as roots.

If your collector is relocating, you'll need to give more information.  
In particular, I'm not sure you how you can implement a relocating 
collector which doesn't know about derived pointers without some really 
messy hacks.

Philip

On 12/30/2015 06:51 PM, Manuel Jacob wrote:
> Hi,
>
> My collector supports only base pointers as stack roots.  This wasn't 
> a problem until I tried to run some optimizations before RS4GC, which 
> introduced (interior) derived pointers.  The statepoint documentation 
> mentions that these collectors exist, but doesn't mention whether and 
> how this is currently supported.  What could I do to make it work?
>
> -Manuel



More information about the llvm-dev mailing list