[Statepoints] Initial support for relocating vectors of pointers
authorPhilip Reames <listmail@philipreames.com>
Thu, 7 Jan 2016 03:32:11 +0000 (03:32 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 7 Jan 2016 03:32:11 +0000 (03:32 +0000)
commit82a04b17aeffdf31b7665f927ac42d81e80c07f0
tree2ded922ab9832d572c0baeedac1b97c004959a4d
parent3d5f22734f013619f37219afc9c8d57de7c00871
[Statepoints] Initial support for relocating vectors of pointers

Currently, we try to split vectors of pointers back into their component pointer elements during rewrite-statepoints-for-gc. This is less than ideal since presumably the vectorizer chose to vectorize for a reason. :) It's also been a source of bugs - in particular, the relocation logic as currently implemented was recently discovered to be wrong.

The alternate approach is to allow gc.relocates of vector-of-pointer type and update the backend to handle them. That's what this patch tries to do. This won't actually enable vector-of-pointers in practice - there are some RS4GC changes needed - but the lowering is standalone and testable so it makes sense to separate.

Note that there are some known cases around vector constants which this patch does not handle. Once this is in, I'll send another patch with individual fixes and test cases.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257022 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Intrinsics.td
lib/CodeGen/SelectionDAG/StatepointLowering.cpp
lib/IR/Verifier.cpp
test/CodeGen/X86/statepoint-vector.ll [new file with mode: 0644]
test/Verifier/gc_relocate_return.ll