摘要
现代编译器越来越依赖SIMD指令来提高向量化性能,但控制流的复杂性严重阻碍了SIMD向量化的发掘。现有的控制流向量化方法对于单层控制流的向量化很有效,但对嵌套等复杂控制流无法取得令人满意的效果。因此,提出了一种基于条件分类的控制流向量化方法。该方法对条件为循环不变量的控制流,以层次遍历的顺序实施IF外提;对条件为循环变量的控制流,结合语句匹配和条件合并递归地进行IF转换,生成相应的SIMD指令,从而实现嵌套控制流的向量化。实验结果表明,该方法能够有效消除循环中的嵌套控制流,提高向量化发掘的能力,有效提升测试程序的性能。
Modern compilers increasingly rely on SIMD instructions to improve the performance of vectorization. How- ever,the complexity of control flow seriously inhibits the exploitation of SIMD vectorization. Current vectorization methods of control flow are proved effective for single-level control flow, but attain poor performance for nested control flow. Hence, a method of control flow vectorization based on conditions classification was presented. Loop Unswitching is applied in the order of level traverse if the condition of the control flow is loop invariant. When the condition of the control flow is loop variant, IF conversion is implemented recursively combined with statement matching and condition join. Then SIMD instructions are generated correspondingly and vectorization of nested control flow is realized. The ex- perimental results show that the proposed method can efficiently remove the nested control flow from the loops and pro- mote the ability of vectorization. Effective acceleration is achieved for the test applications.
出处
《计算机科学》
CSCD
北大核心
2015年第11期240-247,共8页
Computer Science
基金
"核高基"国家科技重大专项(2009ZX01036)资助
关键词
控制流
SIMD向量化
条件分类
IF外提
IF转换
Control flow, SIMD vectorization, Conditions classification, Loop unswitching, IF conversion