Loop Distribution and Fusion with Timing and Code Size Optimization

  • Authors:
  • Meilin Liu;Edwin H. Sha;Qingfeng Zhuge;Yi He;Meikang Qiu

  • Affiliations:
  • Department of Computer Science, Wright State University, Dayton, USA 45435;Department of Computer Science, University of Texas at Dallas, Richardson, USA 75083;Department of Computer Science, University of Texas at Dallas, Richardson, USA 75083;Department of Computer Science, University of Texas at Dallas, Richardson, USA 75083;Department of Electrical and Computer Engineering, University of Kentucky, Lexington, USA 40506

  • Venue:
  • Journal of Signal Processing Systems
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper, a technique that combines loop distribution with maximum direct loop fusion (LD_MDF) is proposed. The technique performs maximum loop distribution, followed by maximum direct loop fusion to optimize timing and code size simultaneously. The loop distribution theorems that state the conditions distributing any multi-level nested loop in the maximum way are proved. It is proved that the statements involved in the dependence cycle can be fully distributed if the summation of the edge weight of the dependence cycle satisfies a certain condition; otherwise, the statements should be put in the same loop after loop distribution. Based on the loop distribution theorems, algorithms are designed to conduct maximum loop distribution. The maximum direct loop fusion problem is mapped to the graph partitioning problem. A polynomial graph partitioning algorithm is developed to compute the fusion partitions. It is proved that the proposed maximum direct loop fusion algorithm produces the fewest number of resultant loop nests without violating dependence constraints. It is also shown that the resultant code size of the fused loops by the technique of loop distribution with maximum direct loop fusion is smaller than the code size of the original loops when the number of fused loops is less than the number of the original loops. The simulation results are presented to validate the proposed technique.