[RewriteStatepointsForGC] Limited support for vectors of pointers
authorPhilip Reames <listmail@philipreames.com>
Fri, 10 Apr 2015 21:48:25 +0000 (21:48 +0000)
committerPhilip Reames <listmail@philipreames.com>
Fri, 10 Apr 2015 21:48:25 +0000 (21:48 +0000)
commitcb148c8541b015fe4db2c9fd7cfccd767ba6db1a
tree6e48c95c3c87cad681a416335c60af34d1ffeae4
parent8aca90e5b6322f60c631e635083e877caac4c590
[RewriteStatepointsForGC] Limited support for vectors of pointers

This patch adds limited support for inserting explicit relocations when there's a vector of pointers live over the statepoint. This doesn't handle the case where the vector contains a mix of base and non-base pointers; that's future work.

The current implementation just scalarizes the vector over the gc.statepoint before doing the explicit rewrite. An alternate approach would be to plumb the vector all the way though the backend lowering, but doing that appears challenging. In particular, the size of the indirect spill slot is currently assumed to be sizeof(pointer) throughout the backend.

In practice, this is enough to allow running the SLP and Loop vectorizers before RewriteStatepointsForGC.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234647 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
test/Transforms/RewriteStatepointsForGC/live-vector.ll [new file with mode: 0644]