SLPVectorizer: limit the scheduling region size per basic block.
authorErik Eckstein <eeckstein@apple.com>
Wed, 30 Sep 2015 17:00:44 +0000 (17:00 +0000)
committerErik Eckstein <eeckstein@apple.com>
Wed, 30 Sep 2015 17:00:44 +0000 (17:00 +0000)
commite2b61758207f6ae12084a750791b65d82f61b252
tree58b8732c188c354181338aa7c66d4049e249a94f
parentd97e13c17a56dd9d7157e9fa1d31af60fbfdd58a
SLPVectorizer: limit the scheduling region size per basic block.

Usually large blocks are not a problem. But if a large block (> 10k instructions)
contains many (potential) chains of vector instructions, and those chains are
spread over a wide range of instructions, then scheduling becomes a compile time problem.
This change introduces a limit for the accumulate scheduling region size of a block.
For real-world functions this limit will never be exceeded (it's about 10x larger than
the maximum value seen in the test-suite and external test suite).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248917 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/schedule_budget.ll [new file with mode: 0644]