首页|期刊导航|信息工程大学学报|RISC-V向量滑动指令在编译器中的自动生成方法

RISC-V向量滑动指令在编译器中的自动生成方法OA

Automatic Generation Method of RISC-V Vector Sliding Instructions in Compilers

中文摘要英文摘要

针对RISC-V V扩展向量滑动指令在图形处理、信号处理等领域实用价值显著,但现有编译器自动向量化框架不支持其自动生成、性能潜力受限的问题,提出一种面向该指令的自动向量化框架.首先,该框架可识别具有目标特征的标量循环,并将其自动转换为含向量滑动指令的向量化循环;其次,该框架已集成至GCC编译器(GNU C/C++Compiler).基于gem5模拟器,选取多领域典型应用核心函数开展测试.实验结果表明,所提框架可有效完成向量滑动指令的自动生成.性能对比显示,与标量版本相比,经向量滑动指令优化后的核心函数性能提升显著,最高加速比为20.1,几何平均加速比为8.44.

Although vector sliding instructions in the RISC-V V extension exhibit significant practical value in graphics processing,signal processing and other fields,automatic generation of such instruc‑tions is not supported in the existing compiler auto-vectorization frameworks,thus limiting their perfor‑mance potential.To address this issue,an auto-vectorization framework oriented to vector sliding in‑structions is proposed.Firstly,scalar loops with target characteristics can be identified in the frame‑work,which is further automatically transformed into vectorization loops containing vector sliding in‑structions.Secondly,the framework has been integrated into the GCC compiler.Kernel functions of typi‑cal applications across multiple domains are selected for testing based on the gem5 simulator.Experi‑mental results demonstrate that automatic generation of vector sliding instructions can be effectively achieved in the proposed framework.Performance comparisons indicate that the kernel functions opti‑mized with vector sliding instructions gain remarkable performance improvements compared with those of their scalar counterparts,with a maximum speedup of 20.1 and a geometric mean speedup of 8.44.

姚金阳;刘福东;戚旭衍

信息工程大学,河南 郑州 450001信息工程大学,河南 郑州 450001信息工程大学,河南 郑州 450001

信息技术与安全科学

编译器自动向量化单指令多数据RISC-V架构向量滑动指令

compilerauto-vectorizationsingle instruction multiple dataRISC-V architecturevec‑tor sliding instructions

《信息工程大学学报》 2026 (2)

169-177,9

10.3969/j.issn.1671-0673.2026.02.006

评论