Extract out a SelectionDAGBuilder::LowerAsStatepoint; NFC
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 16 Mar 2016 23:08:00 +0000 (23:08 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 16 Mar 2016 23:08:00 +0000 (23:08 +0000)
commit70697ff74d16019bac34e8aa5461751904e2ef89
tree07934a89deeaa6b9f1215271b41d6406b60cbd84
parent54bf9e1ca53d881f569f86c7361b63208986cc1e
Extract out a SelectionDAGBuilder::LowerAsStatepoint; NFC

Summary:
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`.

Reviewers: reames, pgavlin, JosephTremoulet

Subscribers: sanjoy, mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D18106

llvm-svn: 263671
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp