Journal of Software:2017.28(8):2046-2063

(数学工程与先进计算国家重点实验室(解放军信息工程大学), 河南 郑州 450001)
Improved SIMD Vectorization Method in the Presence of Control Flow
GAO Wei,LI Ying-Ying,SUN Hui-Hui,LI Yan-Bing,ZHAO Rong-Cai
(State Key Laboratory of Mathematical Engineering and Advanced Computing(PLA Information Engineering University), Zhengzhou 450001, China)
Chart / table
Similar Articles
Article :Browse 990   Download 826
Received:June 24, 2015    Revised:March 18, 2016
> 中文摘要: SIMD扩展部件是近年来集成到通用处理器中的加速部件,旨在发掘多媒体和科学计算等程序的数据级并行.控制依赖给发掘程序中的数据级并行带来了阻碍,当前,无论基于loop-based还是SLP的控制流向量化方法都需要if转换,而没有考虑循环内蕴含的向量并行度,导致生成的向量代码效率较低.此外,不精确的代价模型指导控制流向量化,同样导致生成的向量代码效率较低.为此,提出了改进的控制流SIMD向量化方法.首先,提出了含有控制依赖的循环分布算法,分离循环的可向量化部分和不可向量化部分,同时考虑分布时数据的局部性;其次,提出了一种直接向量化控制流的方法,该方法考虑了基本块间的向量重用;最后,利用精确的代价模型指导超字选择指令和超字条件分支指令的生成.实验结果表明:与现有的控制流向量化方法相比,改进方法生成的向量代码性能提高了24%.
Abstract:SIMD extension is an acceleration component integrated into the general processor for developing data level parallelism in multimedia and scientific computing applications. Control dependence hinders exploiting data level parallelism in the programs. Current vectorization methods in the presence of control flow, loop-based or SLP, all need if-conversion. They do not consider the SIMD parallelism in programs, and thus result in a lower SIMD executing efficiency. Another factor that leads to low efficiency is the lack of cost model to direct SIMD code generation in the presence of control flow. To address these problems, an improved control flow SIMD vectorization method is proposed. First, loop distribution with control dependence is put up to separate the vectorizable parts and unvectorizable parts, taking data locality into account simultaneously. Second, a direct vectorization method of control flow is presented considering the reuse of data between basic blocks. Finally, cost model is used to guide the generation of select and BOSCCs to improve the efficiency of SIMD code. Experimental results show that the code performance generated by the improved methods increase by 24% compared with those of the existing control flow vectorization methods.
文章编号:     中图分类号:    文献标志码:
基金项目:“核高基”国家科技重大专项(2009ZX01036) “核高基”国家科技重大专项(2009ZX01036)
Foundation items:CHB National Major Science and Technology Project Foundation of China (2009ZX01036)
Reference text:


GAO Wei,LI Ying-Ying,SUN Hui-Hui,LI Yan-Bing,ZHAO Rong-Cai.Improved SIMD Vectorization Method in the Presence of Control Flow.Journal of Software,2017,28(8):2046-2063