This change adds two new parameters to the statepoint intrinsic, i64 id
and i32 num_patch_bytes. id gets propagated to the ID field
in the generated StackMap section. If the num_patch_bytes is
non-zero then the statepoint is lowered to num_patch_bytes bytes of
nops instead of a call (the spill and reload code remains unchanged).
A non-zero num_patch_bytes is useful in situations where a language
runtime requires complete control over how a call is lowered.
This change brings statepoints one step closer to patchpoints. With
some additional work (that is not part of this patch) it should be
possible to get rid of TargetOpcode::STATEPOINT altogether.
PlaceSafepoints generates statepoint wrappers with both id and
num_patch_bytes set to 0. This can be made more sophisticated
later.
Typo:
@llvm.experimental.gc.statepoint.p0f_isVoidfi64 0, i32 0, (void ()* @foo, i32 0
should be:
@llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* @foo, i64 0, i32 0, i32 0