Method for improving the efficiency of arithmetic code generation in an optimizing compiler using the technique of reassociation
Abstract
A procedure for use in an optimizing compiler termed "reassociation" determines the preferred order of combining terms in a sum so as to produce loop invariant subcomputations, or to promote common subexpressions among several essential computations, by applying the associative law of addition. To achieve this, the requisite optimization of an object program or program segment, the following discrete steps must be performed after the strongly connected regions, USE and DEF chains have all been identified: 1. Find the region constants and induction variables; 2. Identify all of the essential computations; 3. Write every essential computation as a sum of products; 4. Exploit the use and DEF functions to substitute the definition of each operand R in an essential computation, if there is a unique computation of R in the strongly connected region and the defining operation is +, -, ×, or copy; 5. Fix displacements; 6. Determine how to compute each essential computation and rewrite code to use this preferred method of computation; 7. Insert code to update the new induction variables; 8. Perform linear test replacement.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 47.
Claims (2 — 2 Independent, 0 Dependent)
- Claim 1Independent Claim
In an optimizing compiler, a method for use in a code optimization phase of the compiler's operation to optimize code in a program presented for compilation, said method utilizing reassociation principles to determine a preferred order of combining terms in a sum in order to produce loop invariant subcomputations and to promote common sub-expressions among several essential computations which method comprises the steps of: 1. performing control flow analysis on said code to find and indentify strongly connected regions in said program; 2.
- Claim 2Independent Claim
identifying and marking USE and DEF functions in said code; 3. locating and marking region constants and induction variables in said code; 4. locating and marking all essential computations in said code;
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 47 total)
References Cited — Backward Prior Art (5)
Non-Patent Literature (4)
- Randolph G. Scarborough and Harwood G. Kolsky, "Improved Optimization of Fortran Object Programs," IBM J. Res. Develop. vol. 24, No. 6, pp. 660-676, Nov. 1980.
- Randolph G. Scarborough and Harwood G. Kolsky, Improved Optimization of Fortran Object Programs, IBM J. Res. Develop. vol. 24, No. 6, pp. 660 676, Nov. 1980.
- Robert Paige, "Formal Differentiation," Courant Computer Science Report #15, Courant Institute of Mathematical Sciences, New York University, Sep. 1979.
- Robert Paige, Formal Differentiation, Courant Computer Science Report 15, Courant Institute of Mathematical Sciences, New York University, Sep. 1979.