SLPVectorizer: Implement DCE as part of vectorization.
authorNadav Rotem <nrotem@apple.com>
Sun, 7 Jul 2013 06:57:07 +0000 (06:57 +0000)
committerNadav Rotem <nrotem@apple.com>
Sun, 7 Jul 2013 06:57:07 +0000 (06:57 +0000)
commit369cc938d261de3295eb70d0738f54ef1a82806c
tree10497d00e5f4f7a2cd0a9d4b741da0d448787f10
parent95a1b3484d7daf7830161f1613fc812303641abe
SLPVectorizer: Implement DCE as part of vectorization.

This is a complete re-write if the bottom-up vectorization class.
Before this commit we scanned the instruction tree 3 times. First in search of merge points for the trees. Second, for estimating the cost. And finally for vectorization.
There was a lot of code duplication and adding the DCE exposed bugs. The new design is simpler and DCE was a part of the design.
In this implementation we build the tree once. After that we estimate the cost by scanning the different entries in the constructed tree (in any order). The vectorization phase also works on the built tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185774 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/crash_7zip.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_bullet.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_bullet2.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_dequeue.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_flop7.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_lame.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_lencod.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_lencod2.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_mandeltext.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_rc4.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_sim4b1.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_smallpt.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/crash_smallpt2.ll [new file with mode: 0644]
test/Transforms/SLPVectorizer/X86/diamond.ll
test/Transforms/SLPVectorizer/X86/long_chains.ll
test/Transforms/SLPVectorizer/X86/saxpy.ll