Refactoring gc_relocate related code in CodeGenPrepare.cpp
authorSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 11 May 2015 23:47:30 +0000 (23:47 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 11 May 2015 23:47:30 +0000 (23:47 +0000)
commit3d705e37c322cae86e5f5fd1cf7fd198d387ddb2
tree0289ed5edb77aacd3bbac0cf4001321e33c50e3d
parent5665c999c2ab7ec7c00e3d1eab2c4c43756429a3
Refactoring gc_relocate related code in CodeGenPrepare.cpp

Summary:
The original code inserted new instructions by following a
Create->Remove->ReInsert flow. This patch removes the unnecessary
Remove->ReInsert part by setting up the InsertPoint correctly at the
very beginning. This change does not introduce any functionality change.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 237070
llvm/lib/CodeGen/CodeGenPrepare.cpp