forked from OSchip/llvm-project
364da7e527
This patch attempts to scalarize the operand expressions of predicated instructions if they were conditionally executed in the original loop. After scalarization, the expressions will be sunk inside the blocks created for the predicated instructions. The transformation essentially performs un-if-conversion on the operands. The cost model has been updated to determine if scalarization is profitable. It compares the cost of a vectorized instruction, assuming it will be if-converted, to the cost of the scalarized instruction, assuming that the instructions corresponding to each vector lane will be sunk inside a predicated block, possibly avoiding execution. If it's more profitable to scalarize the entire expression tree feeding the predicated instruction, the expression will be scalarized; otherwise, it will be vectorized. We only consider the cost of the entire expression to accurately estimate the cost of the required insertelement and extractelement instructions. Differential Revision: https://reviews.llvm.org/D26083 llvm-svn: 288909 |
||
---|---|---|
.. | ||
BBVectorize.cpp | ||
CMakeLists.txt | ||
LLVMBuild.txt | ||
LoadStoreVectorizer.cpp | ||
LoopVectorize.cpp | ||
SLPVectorizer.cpp | ||
Vectorize.cpp |