PSLP: Padded SLP automatic vectorization

PSLP: Padded SLP automatic vectorization
复制标题

DOI:
10.1109/cgo.2015.7054199
复制
发表时间:
2015-02
期刊:
2015 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)
影响因子:
--
通讯作者:
Vasileios Porpodas;A. Magni;Timothy M. Jones
Vasileios Porpodas;A. Magni;Timothy M. Jones
中科院分区:
其他
文献类型:
--
作者:
Vasileios Porpodas;A. Magni;Timothy M. Jones

文献摘要

相似文献

提高现代处理器的性能和功率效率的需求导致SIMD矢量单元的广泛采用。所有主要供应商都支持向量指示,并且趋势正在促使它们变得更广泛,更强大。但是,编写有效利用这些单元的代码很难,并且导致了特定于平台的实现。基于编译器的自动矢量化是解决此问题的一种解决方案。特别是,超级词级并行性(SLP)矢量化算法是自动生成从直线标量代码开始的向量代码的主要方法。 SLP均在包括GCC和LLVM在内的所有主要编译器中实施。 SLP依靠找到同构指令的序列将载体堆积在一起。但是,这阻碍了算法的适用性,因为在实践中并不常见。在这项工作中,我们提出了一种解决这一限制的解决方案。我们引入了PADDED SLP(PSLP),这是一种新型的矢量化算法,可以将包含非同构教学序列的代码矢量化。它将几乎最小数量的冗余指令注入代码中,以将非同构序列转化为同构序列。然后可以成功地将填充的指令序列成功化。我们的实验表明,PSLP改善了许多内核和完整基准的矢量化覆盖范围,将执行时间降低了63%。
The need to increase performance and power efficiency in modern processors has led to a wide adoption of SIMD vector units. All major vendors support vector instructions and the trend is pushing them to become wider and more powerful. However, writing code that makes efficient use of these units is hard and leads to platform-specific implementations. Compiler-based automatic vectorization is one solution for this problem. In particular the Superword-Level Parallelism (SLP) vectorization algorithm is the primary way to automatically generate vector code starting from straight-line scalar code. SLP is implemented in all major compilers, including GCC and LLVM. SLP relies on finding sequences of isomorphic instructions to pack together into vectors. However, this hinders the applicability of the algorithm as isomorphic code sequences are not common in practice. In this work we propose a solution to overcome this limitation. We introduce Padded SLP (PSLP), a novel vectorization algorithm that can vectorize code containing non-isomorphic instruction sequences. It injects a near-minimal number of redundant instructions into the code to transform non-isomorphic sequences into isomorphic ones. The padded instruction sequence can then be successfully vectorized. Our experiments show that PSLP improves vectorization coverage across a number of kernels and full benchmarks, decreasing execution time by up to 63%.