Merge the removal of dead instructions and lifetime markers with the
authorChandler Carruth <chandlerc@gmail.com>
Sat, 27 Jul 2013 09:43:30 +0000 (09:43 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 27 Jul 2013 09:43:30 +0000 (09:43 +0000)
commit33ae89911311f83b6a093a421993a29aa687a0b2
tree3fe6e43f39a84a3a04dec5dbdaa0433bc7118a06
parentfb49c513ac41b157332a179970409320fce48a92
Merge the removal of dead instructions and lifetime markers with the
analysis of the alloca. We don't need to visit all the users twice for
this. We build up a kill list during the analysis and then just process
it afterward. This recovers the tiny bit of performance lost by moving
to the visitor based analysis system as it removes one entire use-list
walk from mem2reg. In some cases, this is now faster than mem2reg was
previously.

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