Fast-ISel: Remove dead code after falling back from selecting call instructions ...
authorHans Wennborg <hans@hanshq.net>
Mon, 8 Sep 2014 20:24:10 +0000 (20:24 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 8 Sep 2014 20:24:10 +0000 (20:24 +0000)
commit4cd53531fdaf94786e19e9157744c6092b8de046
tree83267a4b6a72ec68597e1e63448d7ddd590d1867
parent50a5cda1359870bec75085171fd0612fb235dd31
Fast-ISel: Remove dead code after falling back from selecting call instructions (PR20863)

Previously, fast-isel would not clean up after failing to select a call
instruction, because it would have called flushLocalValueMap() which moves
the insertion point, making SavedInsertPt in selectInstruction() invalid.

Fixing this by making SavedInsertPt a member variable, and having
flushLocalValueMap() update it.

This removes some redundant code at -O0, and more importantly fixes PR20863.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217401 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/FastISel.h
lib/CodeGen/SelectionDAG/FastISel.cpp
test/CodeGen/X86/fast-isel-x86.ll