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)
commit23ac4f1856ae6659db2d74be14996e3fa4077b65
tree96f4da431e465856c8872c133d2ce3cc508126aa
parentaa1c57e324a08e5859b1efbf3e63bf6339613724
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237070 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPrepare.cpp