Logo image
Enhancing LLVM Optimizations for Linear Recurrence Programs on RVV
Conference paper

Enhancing LLVM Optimizations for Linear Recurrence Programs on RVV

Hung-Ming Lai, Jenq-Kuen Lee and Yuan-Shin Hwang
ACM International Conference Proceeding Series, pp.79-87
08/2023

Abstract

auto-vectorization recurrence RISC-V vector extension scan SIMD Human-Computer Interaction Computer Networks and Communications Computer Vision and Pattern Recognition Software
The RISC-V Vector Extension (RVV) has emerged as a promising vector architecture for high-performance computing. It enables parallel computing capability for RISC-V CPUs by introducing additional vector instructions and vector registers. To fully utilize the potential of RVV, it is crucial to optimize the auto-vectorization capabilities of compilers. Auto-vectorization is a widely used method for parallelizing scalar programs on vector machines. It examines the input program to identify the parallelizable section and then maps it to the underlying vector architecture. This paper focuses on enhancing LLVM's auto-vectorization for linear recurrence programs on RVV, with a specific emphasis on a well-studied computation pattern called scan (all-prefix-sums). Linear recurrence programs are prevalent in diverse computational domains, and their efficient execution is vital for achieving optimal performance. However, the auto-vectorization on current LLVM's vectorizer is hindered by the loop-carried data dependence of recurrence programs. In this work, we propose novel techniques to address the challenges of auto-vectorizing linear recurrence programs on RVV, leveraging the unique features of RVV and extending LLVM's vectorization capabilities. The experiment shows that our auto-vectorized plus-scan can achieved 17.64x speedup on RVV compared to LLVM 16.0.0.

Metrics

1 Record Views

Details

Logo image