Fix PR2369 by making scalarrepl more careful about promoting
authorChris Lattner <sabre@nondot.org>
Sun, 22 Jun 2008 17:46:21 +0000 (17:46 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 22 Jun 2008 17:46:21 +0000 (17:46 +0000)
commit963a97f1a365c8d09ca681e922371f9ec3473ee8
tree6ef8e9881a444efb5b28f55b6df2eed615fd9a6d
parent69bfb15ecd71881ec8d01be94af99b6d90d2fe01
Fix PR2369 by making scalarrepl more careful about promoting
structures.  Its default threshold is to promote things that are
smaller than 128 bytes, which is sane.  However, it is not sane
to do this for things that turn into 128 *registers*.  Add a cap
on the number of registers introduced, defaulting to 128/4=32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52611 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll [new file with mode: 0644]