This is a step towards implementing "direct" lowering of calls and
invokes with deopt operand bundles into STATEPOINT nodes (as opposed to
having them mandatorily pass through RewriteStatepointsForGC, which is
the case today).
This change extracts out a SelectionDAGBuilder::LowerAsStatepoint
helper function that is able to lower a "statepoint like thing", and
uses it to lower gc.statepoint calls. This is an NFC now, but in a
later change we will use LowerAsStatepoint to directly lower calls and
invokes with operand bundles without going through an intermediate
gc.statepoint IR representation.
FYI: I expect SelectionDAGBuilder::StatepointInfo will evolve as I add
support for lowering non gc.statepoints, right now it is fairly tightly
coupled with an IR level gc.statepoint.