All you need is superword-level parallelism: systematic control-flow vectorization with SLP

Yishen Chen, Charith Mendis, Saman Amarasinghe

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Superword-level parallelism (SLP) vectorization is a proven technique for vectorizing straight-line code. It works by replacing independent, isomorphic instructions with equivalent vector instructions. Larsen and Amarasinghe originally proposed using SLP vectorization (together with loop unrolling) as a simpler, more flexible alternative to traditional loop vectorization. However, this vision of replacing traditional loop vectorization has not been realized because SLP vectorization cannot directly reason with control flow. In this work, we introduce SuperVectorization, a new vectorization framework that generalizes SLP vectorization to uncover parallelism that spans different basic blocks and loop nests. With the capability to systematically vectorize instructions across control-flow regions such as basic blocks and loops, our framework simultaneously subsumes the roles of inner-loop, outer-loop, and straight-line vectorizer while retaining the flexibility of SLP vectorization (e.g., partial vectorization). Our evaluation shows that a single instance of our vectorizer is competitive with and, in many cases, significantly better than LLVM's vectorization pipeline, which includes both loop and SLP vectorizers. For example, on an unoptimized, sequential volume renderer from Pharr and Mark, our vectorizer gains a 3.28× speedup, whereas none of the production compilers that we tested vectorizes to its complex control-flow constructs.

Original languageEnglish (US)
Title of host publicationPLDI 2022 - Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation
EditorsRanjit Jhala, Isil Dillig
PublisherAssociation for Computing Machinery
Pages301-315
Number of pages15
ISBN (Electronic)9781450392655
DOIs
StatePublished - Jun 9 2022
Event43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2022 - Virtual, Online, United States
Duration: Jun 13 2022Jun 17 2022

Publication series

NameProceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI)

Conference

Conference43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2022
Country/TerritoryUnited States
CityVirtual, Online
Period6/13/226/17/22

Keywords

  • auto-vectorization
  • optimization

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'All you need is superword-level parallelism: systematic control-flow vectorization with SLP'. Together they form a unique fingerprint.

Cite this