Statepoint GC: query about non-relocating statepoints and instcombine


I'm using the statepoint GC infra, but without RS4GC. I'm manually emitting
statepoints and not currently doing relocations.

I ran into an issue when updating from 11 to 12 (or 13, or ToT): my gc-live
operand bundles were being wiped.

I tracked this down to ⚙ D85959 [InstCombine] Remove unused entries in gc-liv bundle of statepoint, but this just has
me more confused. If InstCombine removes any gc-live entries that aren't
relocated, how are you meant to emit the explicit statepoints?

I might just be missing something obvious here- the documentation for explicit
statepoints seems sparse and out of date.

Hopefully someone has some insight. :slight_smile:


The values are assumed to be relocated if live at the safepoint. Thus, even with a non-relocating GC, we decide the values aren't live.

You can fix this by generating the gc.relocates.