CONCURRENCY AND COMPUTATION: PRACTICE AND EXPERIENCE Concurrency Computat.: Pract. Exper. 2007; 19:2425–2443 Prepared using cpeauth.cls [Version: 2002/09/19 v2.02] Efficient Search-Space Pruning for Integrated Fusion and Tiling Transformations Xiaoyang Gao † , Sriram Krishnamoorthy † , Swarup Kumar Sahoo † , Chi-Chung Lam † , Gerald Baumgartner ‡ , J. Ramanujam * , P. Sadayappan † SUMMARY Compile-time optimizations involve a number of transformations such as loop permutation, fusion, tiling, array contraction, etc. Determination of the choice of these transformations that minimizes the execution time is a challenging task. We address this problem in the context of tensor contraction expressions involving arrays too large to fit in main memory. Domain-specific features of the computation are exploited to develop an integrated framework that facilitates the exploration of the entire search space of optimizations. In this paper, we discuss the exploration of the space of loop fusion and tiling transformations in order to minimize the disk I/O cost. These two transformations are integrated and pruning strategies are presented that significantly reduce the number of loop structures to be evaluated for subsequent transformations. The evaluation of the framework using representative contraction expressions from quantum chemistry shows a dramatic reduction in the size of the search space using the strategies presented. KEY WORDS: loop fusion, loop tiling, integrated loop transformations, out-of-core computations, pruning the search-space of optimizations, tensor contractions 1. Introduction Optimizing compilers incorporate a number of loop transformations such as permutation, tiling, fusion, etc. Considerable work has addressed loop tiling for enhancement of data locality [4, 5, 13, 18, 19, 22, 23, 24, 25]. Much work has also been done on improving locality and/or parallelism by loop fusion * Correspondence to: J. Ramanujam, Department of Electrical and Computer Engineering and Center for Computation and Technology, Louisiana State University, Baton Rouge, LA 70803, USA. E-mail: jxr@ece.lsu.edu † Department of Computer Science and Engineering, The Ohio State University, Columbus, OH 43210, USA. E-mail: {gaox,krishnsr,sahoo,clam,saday}@cse.ohio-state.edu ‡ Department of Computer Science, Louisiana State University, Baton Rouge, LA 70803, USA. E-mail: gb@csc.lsu.edu Contract/grant sponsor: US National Science Foundation; contract/grant number: 0121676, 0121706, 0403342, 0508245, 0509442, and 0509467 Copyright c 2007 John Wiley & Sons, Ltd.