[PATCH] improve scheduling in SLPVectorizer

Erik Eckstein eeckstein at apple.com
Tue Jul 15 01:37:56 PDT 2014


Hi,

This patch improves the scheduling in the SLPVectorizer. Originally the SLPVectorizer could only move instructions of a bundle down. The new scheduling algorithm is more general, which means that (in theory) it should always schedule better than the old approach.

The change fixes: <rdar://problem/13677020> [SLP vectorizer] - SLP Vectorizer needs to be able to start trees at multiple user reductions.
Another example is Bug 19657, where the new algorithm replaces the need for the heuristics for fixing it.

The compile time and execution times for the test suite look ok. Measured with the test suite on x86.

Compile time: approximately the same as before. The new algorithm fixes a compile time problem for the (synthetic) test SingleSource/UnitTest/Vector/constpool. This compiles much faster now.

Execution time: not too much changes. A few benchmarks show improvements when compiled with -O3 -flto.

Statistics: With the new scheduling algorithm the SLPVectorizer can generate about 9% more llvm vector instructions. Note that this is a static count, not the number of _executed_ instructions (So if not inside a critical loop it will not show up in execution time).

As this patch is not trivial, I plan to commit it after the 3.5 branch.

Please let me know your comments (Arnold and Nadav already looked at the patch).

Thanks,
Erik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140715/8b11e321/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slpvectorizer-scheduling-3.patch
Type: application/octet-stream
Size: 51380 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140715/8b11e321/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140715/8b11e321/attachment-0001.html>


More information about the llvm-commits mailing list