A practical system fljr intermodule code optimization at link-time

We have developed a system called OM to explore the problem of code optimization at link-time. OM takes a collection of object modules constituting the entire program, and converts the object code into a symbolic Register Transfer Language (RTL) form that can be easily manipulated. This RTL is then transformed by intermodule optimization and finally converted back into object form. Although much high-level information about the program is gone at link-time, this approach enables us to perform optimizations that a compiler looking at a single module cannot see. Since object modules are more or less independent of the particular source language or compiler, this also gives us the chance to improve the code in ways that some compilers might simply have missed. To test the concept, we have used OM to build an optimizer that does interprocedural code motion. It moves simple loop-invariant code out of loops, even when the loop body extends across many procedures and the loop control is in a different procedure from the invariant code. Our technique also easily handles ‘‘loops’’ induced by recursion rather than iteration. Our code motion technique makes use of an interprocedural liveness analysis to discover dead registers that it can use to hold loop-invariant results. This liveness analysis also lets us perform interprocedural dead code elimination. We applied our code motion and dead code removal to SPEC benchmarks compiled with optimization using the standard compilers for the DECstation 5000. Our system improved the performance by 5% on average and by more than 14% in one case. More improvement should be possible soon; at present we move only simple load and load-address operations out of loops, and we scavenge registers to hold these values, rather than completely reallocating them. This paper will appear in the March issue of Journal of Programming Languages. It replaces Technical Note TN-31, an earlier version of the same material.

[1]  W. Hamburgen,et al.  Pool boiling enhancement techniques for water at low pressure , 1991, 1991 Proceedings, Seventh IEEE Semiconductor Thermal Measurement and Management Symposium.

[2]  S. McFarling Combining Branch Predictors , 1993 .

[3]  Deborah Estrin,et al.  Visa Protocols for Controlling Inter-Organizational Datagram Flow : Extended Description , 1989 .

[4]  W. Hamburgen,et al.  Packaging a 150-W bipolar ECL microprocessor , 1992, 1992 Proceedings 42nd Electronic Components & Technology Conference.

[5]  N. P. Jouppi,et al.  Integration and packaging plateaus of processor performance , 1989, Proceedings 1989 IEEE International Conference on Computer Design: VLSI in Computers and Processors.

[6]  David B. Lomet Data Flow Analysis in the Presence of Procedure Calls , 1977, IBM J. Res. Dev..

[7]  Barbara G. Ryder,et al.  Pointer-induced aliasing: a problem classification , 1991, POPL '91.

[8]  David W. Wall,et al.  Global register allocation at link time , 1986, SIGPLAN '86.

[9]  James R. Larus,et al.  Rewriting executable files to measure program behavior , 1994, Softw. Pract. Exp..

[10]  Jeffrey C. Mogul Network locality at the scale of processes , 1991, SIGCOMM 1991.

[11]  John Banning,et al.  : An Efficient , 2022 .

[12]  Norman P. Jouppi,et al.  Tradeoffs in two-level on-chip caching , 1994, ISCA '94.

[13]  David W. Wall,et al.  Link-time optimization of address calculation on a 64-bit architecture , 1994, PLDI '94.

[14]  N. P. Jouppi Architectural and organizational tradeoffs in the design of the MultiTitan CPU , 1989, ISCA '89.

[15]  Jeffrey C. Mogul,et al.  Fragmentation considered harmful , 1987, SIGCOMM '87.

[16]  David W. Wall,et al.  Limits of instruction-level parallelism , 1991, ASPLOS IV.

[17]  Scott McFarling,et al.  Procedure merging with instruction caches , 1991, PLDI '91.

[18]  Barry K. Rosen Data Flow Analysis for Procedural Languages , 1979, JACM.

[19]  Jeffrey C. Mogul,et al.  Observing TCP dynamics in real networks , 1992, SIGCOMM '92.

[20]  Jeffrey M. Barth A practical interprocedural data flow analysis algorithm , 1978, CACM.

[21]  Eugene W. Myers,et al.  A precise inter-procedural data flow algorithm , 1981, POPL '81.

[22]  Robert N. Mayo,et al.  Boolean matching for full-custom ECL gates , 1993, ICCAD '93.

[23]  Frances E. Allen,et al.  Interprocedural Data Flow Analysis , 1974, IFIP Congress.

[24]  Stephen Richardson Evaluating interprocedural code optimization techniques , 1992 .

[25]  Ken Kennedy,et al.  Procedure cloning , 1992, Proceedings of the 1992 International Conference on Computer Languages.

[26]  Don Stark,et al.  Analysis of power supply networks in VLSI circuits , 1991 .

[27]  R. Acevedo,et al.  Research report , 1967, Revista odontologica de Puerto Rico.

[28]  R. BoggsD.,et al.  Measured capacity of an Ethernet , 1995 .

[29]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[30]  Norman P. Jouppi Cache write policies and performance , 1993, ISCA '93.

[31]  David W. Wall,et al.  Experience with a software-defined machine architecture , 1992, TOPL.

[32]  Jeffrey C. Mogul Recovery in Spritely NFS , 1994, Comput. Syst..

[33]  William R. Hamburgen,et al.  Optimal Finned Heat Sinks , 1986 .

[34]  Amitabh Srivastava,et al.  Unreachable procedures in object-oriented programming , 1992, LOPL.

[35]  Jeffrey C. Mogul,et al.  Network locality at the scale of processes , 1991, SIGCOMM '91.

[36]  Christopher W. Fraser,et al.  Code selection through object code optimization , 1984, TOPL.

[37]  Norman P. Jouppi,et al.  A simulation based study of TLB performance , 1992, ISCA '92.

[38]  David Callahan,et al.  The program summary graph and flow-sensitive interprocedual data flow analysis , 1988, PLDI '88.

[39]  David W. Wall,et al.  Systems for Late Code Modification , 1991, Code Generation.

[40]  Jeffrey C. Mogul Observing TCP dynamics in real networks , 1992, SIGCOMM 1992.

[41]  Jeremy Dion,et al.  Fast Printed Circuit Board Routing , 1987, 24th ACM/IEEE Design Automation Conference.