[RewriteStatepointsForGC] For some values (like gep's and bitcasts) it's cheaper...
authorIgor Laevsky <igmyrj@gmail.com>
Tue, 19 May 2015 15:59:05 +0000 (15:59 +0000)
committerIgor Laevsky <igmyrj@gmail.com>
Tue, 19 May 2015 15:59:05 +0000 (15:59 +0000)
commit42737039d5b28ff5de624360f1c17fff509664ee
tree0fe5d470b15d06768dab61fdf0cec6edf1f727be
parent70d1005bbdcdc4b909e55955b8d578c4f85c3f0b
[RewriteStatepointsForGC] For some values (like gep's and bitcasts) it's cheaper to clone them after statepoint than to emit proper relocates for them. This change implements this logic. There is alredy similar optimization in CodeGenPrepare, but doing so during RewriteStatepointsForGC allows to capture more opprtunities such as relocates in loops and longer instruction chains.

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

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