summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-dwp/llvm-dwp.cpp
diff options
context:
space:
mode:
authorCong Hou <congh@google.com>2016-02-17 06:37:04 +0000
committerCong Hou <congh@google.com>2016-02-17 06:37:04 +0000
commitbbd4e3b4003f242bcd431af95645626eb50bec53 (patch)
tree2d8bd029c7cc06e9b88dd49a5dcba1409824aaa3 /llvm/tools/llvm-dwp/llvm-dwp.cpp
parenta2b1f45dedeb585ac2296e045c5773df5157e06f (diff)
downloadbcm5719-llvm-bbd4e3b4003f242bcd431af95645626eb50bec53.tar.gz
bcm5719-llvm-bbd4e3b4003f242bcd431af95645626eb50bec53.zip
Detecte vector reduction operations just before instruction selection.
This patch detects vector reductions before instruction selection. Vector reductions are vectorized reduction operations, and for such operations we have freedom to reorganize the elements of the result as long as the reduction of them stay unchanged. This will enable some reduction pattern recognition during instruction combine such as SAD/dot-product on X86. A flag is added to SDNodeFlags to mark those vector reduction nodes to be checked during instruction combine. To detect those vector reductions, we search def-use chains starting from the given instruction, and check if all uses fall into two categories: 1. Reduction with another vector. 2. Reduction on all elements. in which 2 is detected by recognizing the pattern that the loop vectorizer generates to reduce all elements in the vector outside of the loop, which includes several ShuffleVector and one ExtractElement instructions. Differential revision: http://reviews.llvm.org/D15250 llvm-svn: 261070
Diffstat (limited to 'llvm/tools/llvm-dwp/llvm-dwp.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud