Rewrite all the 'PromoteLocallyUsedAlloca[s]' logic. With the power of
authorChris Lattner <sabre@nondot.org>
Mon, 27 Oct 2008 07:05:53 +0000 (07:05 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 27 Oct 2008 07:05:53 +0000 (07:05 +0000)
commit0fd77a579bbed0fa06720474f1c5b2e3cd75004f
tree117e929091b7c0c62e27a183b3b36fea56ac6ebc
parentb457b3c5e79691da99ec54fcea40c1c5f8f2bc9f
Rewrite all the 'PromoteLocallyUsedAlloca[s]' logic.  With the power of
LargeBlockInfo, we can now dramatically simplify their implementation
and speed them up at the same time.  Now the code has time proportional
to the number of uses of the alloca, not the size of the block.

This also eliminates code that tried to batch up different allocas which
are used in the same blocks, and eliminates the 'retry list' logic which
was baroque and no unneccesary.  In addition to being a speedup for crazy
cases, this is also a nice cleanup:

PromoteMemoryToRegister.cpp |  270 +++++++++++++++-----------------------------
 1 file changed, 96 insertions(+), 174 deletions(-)

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