OSDN Git Service

[RS4GC] Strip off invariant.start because memory locations arent invariant
authorAnna Thomas <anna@azul.com>
Thu, 2 Nov 2017 16:23:31 +0000 (16:23 +0000)
committerAnna Thomas <anna@azul.com>
Thu, 2 Nov 2017 16:23:31 +0000 (16:23 +0000)
commit2880b72d32a55c01c386ebf5eca64df58ec32dae
treea5e9e53b84262d95653c416c758bce3417c3786c
parentc0222867301e7d88ec925dea7d306468ff3ea172
[RS4GC] Strip off invariant.start because memory locations arent invariant

Summary:
Invariant.start on memory locations has the property that the memory
location is unchanging. However, this is not true in the face of
rewriting statepoints for GC.
Teach RS4GC about removing invariant.start so that optimizations after
RS4GC does not incorrect sink a load from the memory location past a
statepoint.

Added test showcasing the issue.

Reviewers: reames, apilipenko, dneilson

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D39388

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317215 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
test/Transforms/RewriteStatepointsForGC/drop-invalid-metadata.ll