A parametrized loop fusion algorithm for improving parallelism and cache locality

被引:27
作者
Singhai, SK [1 ]
McKinley, KS [1 ]
机构
[1] Univ Massachusetts, Dept Comp Sci, Amherst, MA 01003 USA
关键词
D O I
10.1093/comjnl/40.6.340
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Loop fusion is a reordering transformation that merges multiple loops into a single loop. It can increase data locality and the granularity of parallel loops, thus improving program performance, Previous approaches to this problem have looked at these two benefits in isolation, In this work, we propose a new model which considers data locality, parallelism and register pressure together, We build a weighted directed acyclic graph in which the nodes represent program loops along with their register pressure, and the edges represent the amount of locality and parallelism present. The direction of an edge represents an execution order constraint. We then partition the graph into components such that the sum of the weights on the edges cut is minimized, subject to the constraint that the nodes in the same partition can be safely fused together, and the register pressure of the combined loop does not exceed the number of available registers. Previous work demonstrates that the general problem of finding optimal partitions is NP-hard, In restricted cases, we show that it is possible to arrive at the optimal solution. We give an algorithm for the restricted case and a heuristic for the general case. We demonstrate the effectiveness of fusion and our approach with experimental results.
引用
收藏
页码:340 / 355
页数:16
相关论文
共 21 条
[1]  
ABUSUFAH W, 1979, THESIS U ILLINOIS UR
[2]  
[Anonymous], 1979, Computers and Intractablity: A Guide to the Theoryof NP-Completeness
[3]  
BRANDES T, 1994, ADAPTOR3 GMD GERM NA
[4]  
BRANDES T, 1994, AUTOMATIC PARALLELIZ
[5]  
CALLAHAN D, 1987, THESIS RICE U
[6]  
EIDSON TM, 1994, 9437 ICASE
[7]  
GAO G, 1992, P 5 WORKSH LANG COMP
[8]  
KENNEDY K, 1993, TR93208 RIC U DEP CO
[9]  
KENNEDY K, 1993, P 6 WORKSH LANG COMP
[10]  
KUCK DJ, 1978, STRUCTURE COMPUTERS, V1