In mem2reg, when handling the single-store case, make sure to remove
authorChris Lattner <sabre@nondot.org>
Sat, 4 Aug 2007 02:15:24 +0000 (02:15 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 4 Aug 2007 02:15:24 +0000 (02:15 +0000)
commitb776a335b1a3260c27555db31f7ea0bee605de04
treedd86d1763f91d73e61b190aa646faf2e6a547bc0
parent022021951ba28914e7ab917c10e3aff8b018b80b
In mem2reg, when handling the single-store case, make sure to remove
a using block from the list if we handle it.  Not doing this caused us
to not be able to promote (with the fast path) allocas which have uses (whoops).

This increases the # allocas hitting this fastpath from 4042 to 8935 on the
testcase in PR1432, speeding up mem2reg by 2.6x

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40809 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/PromoteMemoryToRegister.cpp