Revisiting loop fusion in the polyhedral framework
Authors:
Open Access
- 6 February 2014
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 49 (8) , 233-246
Abstract
Loop fusion is an important compiler optimization for improving memory hierarchy performance through enabling data reuse. Traditional compilers have approached loop fusion in a manner decoupled from other high-level loop optimizations, missing several interesting solutions. Recently, the polyhedral compiler framework with its ability to compose complex transformations, has proved to be promising in performing loop optimizations for small programs. However, our experiments with large programs using state-of-the-art polyhedral compiler frameworks reveal suboptimal fusion partitions in the transformed code. We trace the reason for this to be lack of an effective cost model to choose a good fusion partitioning among the possible choices, which increase exponentially with the number of program statements. In this paper, we propose a fusion algorithm to choose good fusion partitions with two objective functions - achieving good data reuse and preserving parallelism inherent in the source code. These objectives, although targeted by previous work in traditional compilers, pose new challenges within the polyhedral compiler framework and have thus not been addressed. In our algorithm, we propose several heuristics that work effectively within the polyhedral compiler framework and allow us to achieve the proposed objectives. Experimental results show that our fusion algorithm achieves performance comparable to the existing polyhedral compilers for small kernel programs, and significantly outperforms them for large benchmark programs such as those in the SPEC benchmark suite.Keywords
This publication has 16 references indexed in Scilit:
- The Polyhedral Model Is More Widely Applicable Than You Think2010
- Iterative optimization in the polyhedral model2008
- Semi-Automatic Composition of Loop Transformations for Deep Parallelism and Memory HierarchiesInternational Journal of Parallel Programming, 2006
- Facilitating the search for compositions of program transformations2005
- Improving effective bandwidth through compiler enhancement of global cache reuseJournal of Parallel and Distributed Computing, 2004
- Maximizing parallelism and minimizing synchronization with affine partitionsParallel Computing, 1998
- A Parametrized Loop Fusion Algorithm for Improving Parallelism and Cache LocalityThe Computer Journal, 1997
- Some efficient solutions to the affine scheduling problem. Part II. Multidimensional timeInternational Journal of Parallel Programming, 1992
- Some efficient solutions to the affine scheduling problem. I. One-dimensional timeInternational Journal of Parallel Programming, 1992
- A strong-connectivity algorithm and its applications in data flow analysisComputers & Mathematics with Applications, 1981