摘要
循环分布是开发向量化程序的一个有效的方法。但是由于程序中的数据相关性,当前的自动向量化编译器实现完全的循环分布非常困难。因此,当前的自动向量化编译器一般采用简单的循环分布方法。以数据依赖关系分析为基础,从有无依赖环的角度分析了程序中语句的向量化能力,提出了基于语句向量化识别的循环分布算法,并在自动向量化中加以实现。通过此方法,可以充分地分析语句或依赖环的向量化能力,最终采用循环分布,将可向量化的语句与不可向量化的语句分布在不同的循环中。该方法可以处理当前的自动向量化编译器无法向量化的循环,对一些语句间有依赖关系的循环可达到较好的效果。
Loop distribution is a useful method to vectorization programs,but because of the data dependence,it's very hard to completely achieve loop distribution in auto-vectorization.So,it's usually used easily loop distribution in current auto-vectorization compiler.Here,discussed a new loop distribution method based on identify the statement vectorization,from the data dependence view,and achieved in current auto-vectorization compiler.By this method,we can completely analyse which statement can vectorize,which dependence cycle can vectorize,finally using loop distribution,the vectorization statements can and no-vector statements be distributed in different loops.This method can handle these loops which can't be vectorized by other auto-vectorization compilers,and have good effect for some loops which have complex dependence.
出处
《计算机科学》
CSCD
北大核心
2011年第9期288-293,共6页
Computer Science
基金
核高基重大专项"支持国产CPU的编译系统及工具链"(2009ZX01036-001-001-2)资助