[llvm-dev] Status of Garbage Collection with Statepoints in LLVM

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 3 17:02:36 PST 2016


Hi Martin,

Philip covered all of it very well, I'll just add one minor comment:

> More generally, can I back up and ask an important question?  Do you have to
> support deoptimization (i.e. osr side exits) in any form? If you do, you'll
> probably want to avoid the PlaceSafepoints utility pass.  If you need to

PlaceSafepoints is inadequate only if you have asynchronous
invalidation -- i.e. thread X is spinning in a long running loop while
thread Y loaded a class that makes the code running in thread X
invalid, so thread X needs to be polling for deopt safepoints.  If all
your invalidation events are synchronous then deopt bundles +
PlaceSafepoints should be enough for both deoptimization and precise
relocating GC.

If you don't need to *poll* for safepoints at all (perhaps the entire
VM is fully single threaded, so you safepoint only on allocation),
then PlaceSafepoints is not needed at all, and you can directly run
RewriteStatepointsForGC.

-- Sanjoy


More information about the llvm-dev mailing list