Synthesizing transformations for locality enhancement of imperfectly-nested loop nests

被引:27
作者
Ahmed, N [1 ]
Mateev, N [1 ]
Pingali, K [1 ]
机构
[1] Cornell Univ, Dept Comp Sci, Ithaca, NY 14853 USA
关键词
automatic locality enhancement; restructuring compilers; caches; program transformation; imperfectly-nested loops;
D O I
10.1023/A:1012293814832
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Linear loop transformations and tiling are known to be very effective for enhancing locality of reference in perfectly-nested loops. However, they cannot be applied directly to imperfectly-nested loops. Some compilers attempt to convert imperfect ly-nested loops into perfectly-nested loops by using statement sinking, loop fusion, etc., and then apply locality enhancing transformations to the resulting perfect ly-nested loops, but the approaches used are fairly ad hoc and may fail even for simple programs. In this paper, we present a systematic approach for synthesizing transformations to enhance locality in imperfectly-nested loops. The key idea is to embed the iteration space of each statement into a special iteration space called the product space. The product space can be viewed as a perfectly-nested loop nest, so embedding generalizes techniques like statement sinking and loop fusion which are used in ad hoc ways in current compilers to produce perfectly-nested loops from imperfectly-nested ones. In contrast to these ad hoc techniques however, our embeddings are chosen carefully to enhance locality. The product space can itself be transformed to increase locality further, after which fully permutable loops can be tiled. The final code generation step may produce imperfectly-nested loops as output if that is desirable. We present experimental evidence for the effectiveness of this approach, using dense numerical linear algebra benchmarks, relaxation codes, and the tomcatv code from the SPEC benchmarks.
引用
收藏
页码:493 / 544
页数:52
相关论文
共 34 条
[1]  
AHMED N, 2000, P EUR MUN GERM AUG S
[2]  
AHMED N, 2000, P SC2000 DALL TEX NO
[3]  
ANCOURT C, 1991, P 3 ACM SIGPLAN S PR, P39, DOI [10.1145/109625.109631, DOI 10.1145/109625.109631]
[4]  
AYGUADE E, 1993, ACM INT C SUP TOK, P407
[5]  
BANERJEE U, 1989, LANGUAGES COMPILERS, P54
[6]  
CARR S, 1992, SUPERCOMPUTING
[7]  
CHATERJEE S, 1999, INT C SUP ICS 99 JUN
[8]  
CLAUS P, 1996, ACM INT C SUP ACM MA
[9]  
COLEMAN S, 1995, ACM SIGPLAN C PROGR
[10]  
FEAUTRIER P, 1992, I J P P DEC