Abstract:
Aiming at the problems that vectorization compiler tool can not perform auto-vectorization or does blind auto-vectorization because of the insufficient of program analysis ability, this paper proposes a vectorization method based on the compiler directive. The compiler directive is used to guide vectorization compiler tool to perform some special actions and produce high efficiency vectorization code automaticly when it is inserted into the program. Test results show that the method can effectively improve the performance of the object code.
Key words:
Single Instruction Multiple Data(SIMD),
automatic vectorization,
data dependence relationship,
compiler directive,
loop invariant,
vector register
摘要: 编译器由于程序分析能力不足,无法自动实现循环向量化或者会造成盲目自动向量化。为此,提出一种基于编译指示的向量化方法。通过在代码中插入向量化编译指示语句,指导自动向量化编译工具的处理过程,自动生成高效的向量化代码。测试结果表明,该方法能够有效提高目标代码的运行性能。
关键词:
单指令多数据流,
自动向量化,
数据依赖关系,
编译指示,
循环不变量,
向量寄存器
CLC Number:
TAO Yuan, DIAO Rong-Cai. Vectorization Method Based on Compiler Directive[J]. Computer Engineering, 2012, 38(12): 272-275.
姚远, 赵荣彩. 基于编译指示的向量化方法[J]. 计算机工程, 2012, 38(12): 272-275.