[PATCH] Lower invoke statepoints and gc.results tied to them.

Igor Laevsky igor at azulsystems.com
Tue Mar 3 02:54:13 PST 2015


After a bit of investigation and discussions offline it seems like extending current export mechanism to support statepoints is a bit unreasonable. We will need to add hooks in form of:

  Type *t;
  if (isStatepoint(I))
    t = <underlying call type>
  else
    t = <normal type>

In three places:

1. During InitializeRegForValue in FunctionLowering.
2. Create correct CopyToReg in CopyValueToVirtualRegister in SelectionDAGBuilder
3. Create correct CopyFromReg in getValue in SelectionDAGBuilder

This is more invasive compared to the current approach which is just trivial refactoring in SelectionDAGBuilder.
Also this isStatepoint hooks will seem inappropriate in general handling mechanism. Maybe someday when and if there will be more instructions with such problem we will be able to extract common property from them and use it in this checks.

Another approach would be to remove gc.results completely as Philip stated. However this is a bit more work not directly related to this change. I will add TODO concerning this.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7760

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list