[RewriteStatepointsForGC] Strip deref info after rewriting.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 2 Jun 2015 22:33:37 +0000 (22:33 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 2 Jun 2015 22:33:37 +0000 (22:33 +0000)
commitf73780ec1ab0b0a88dda768b10d52e72c3193c02
treecb2bf05b53fa4172b41a6554c3c9dfb6cd2bf448
parente9609875ee06239a8cc8e1b51025735ef7aef725
[RewriteStatepointsForGC] Strip deref info after rewriting.

Summary:
Once a gc.statepoint has been rewritten to relocate live references, the
SSA values represent physical pointers instead of logical references.
Logical dereferencability does not imply physical dereferencability and
after RewriteStatepointsForGC has run any attributes that imply
dereferencability of the logical references need to be stripped.

This current approach is conservative, and can be made more precise
later if needed.  For starters, we need to strip dereferencable
attributes only from pointers that live in the GC address space.

Reviewers: reames, pgavlin

Subscribers: llvm-commits

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

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