[StatepointsForGC] Rematerialize in the presence of PHIs
authorAnna Thomas <anna@azul.com>
Mon, 29 Aug 2016 15:41:59 +0000 (15:41 +0000)
committerAnna Thomas <anna@azul.com>
Mon, 29 Aug 2016 15:41:59 +0000 (15:41 +0000)
commit2bc129c5fda5ccd3c0f6a4c169e998c9208c895e
tree4bcaf1a819e13cbf35b586c7e9237d8c1b9110bf
parent6e711c33b468f9802e515d42017552a85d82e5a9
[StatepointsForGC] Rematerialize in the presence of PHIs

Summary:
While walking the use chain for identifying rematerializable values in RS4GC,
add the case where the current value and base value are the same PHI nodes.

This will aid rematerialization of geps and casts instead of relocating.

Reviewers: sanjoy, reames, igor

Subscribers: llvm-commits

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

llvm-svn: 279975
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
llvm/test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll