Removal of invariant statements from nested-loops in a single effective compiler pass

  • Authors:
  • D. Neel;M. Amirchahy

  • Affiliations:
  • IRIA - BP. 5, 78150 LE CHESNAY, FRANCE;IRIA - BP. 5, 78150 LE CHESNAY, FRANCE

  • Venue:
  • Proceedings of the conference on Programming languages and compilers for parallel and vector machines
  • Year:
  • 1975

Quantified Score

Hi-index 0.00

Visualization

Abstract

This document presents how one of the most important optimizations that a program may undergo is dealt with by means of attributes [7]. A semantic formalization of the classical method which consists of removing all loop-independent statements from the articulation blocks of a loop is given. The method is equally well applicable to algebraic languages or their intermediate code : in a high level language even very well constructed programs quite often contain in their intermediate code version invariant loop expressions where address evaluations are concerned. Whatever the level of nested-loop structure, the method proposed here would not require more than a single real compiler pass in contrast with classical methods which proceed from the innermost loop and shift the invariant statements just one level at each successive pass. Finally an interesting algorithm to determine the articulation blocks of a program is given in the annexe. This method has been so conceived as to take into account the evaluation of attributes by the system DELTA [6]. In this phase of the compiler possibilities of parallel execution are offered as the evaluation program is data oriented. The rigour of formalization attained together with a certain minimization of risks of erroneous optimization applications which it involves render this method indubitably efficient.