LSR: try not to blow up solving combinatorial problems brute force.
authorAndrew Trick <atrick@apple.com>
Tue, 17 Jul 2012 05:00:56 +0000 (05:00 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 17 Jul 2012 05:00:56 +0000 (05:00 +0000)
commit6a51a7aea5d0ae8a0b4ec2162b57c50c68b4c3a9
tree91e096754af098e0b3b5b112b0692eb9035fb675
parentac915b48d8ba73a5d734be5c4a0e1d25cea93252
LSR: try not to blow up solving combinatorial problems brute force.

This places limits on CollectSubexprs to constrains the number of
reassociation possibilities. It limits the recursion depth and skips
over chains of nested recurrences outside the current loop.

Fixes PR13361. Although underlying SCEV behavior is still potentially bad.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160340 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp