Post Link-Time Optimization on the Intel IA-32 Architecture

Post link-time optimization of executables has been investigated by several projects in recent years. These optimization systems have targeted RISC architectures like the Compaq Alpha, and have shown that there is considerable room for improvement in compiler-generated code. Classical compiler optimizations like constant propagation, function inlining, and dead code elimination have been shown to be relatively effective when applied at link-time. In addition, other optimizations—such as value specialization, load/store forwarding, and code layout—that are not typically carried out at compile-time can also be used effectively. Unfortunately, many of the analyses introduced by other systems are insufficient when carried out on a CISC machine (e.g. the x86). We describe PLTO, a link-time optimizer for the Intel IA-32 architecture, that addresses the inherent difficulties in static analysis of binaries compiled for a CISC architecture. Many of the challenging issues stem from intrinsic characteristics of the architecture, such as the small register set which lends way to a heavy reliance on using the runtime stack. This paper discusses many analyses and optimizations used by PLTO, and we show the performance gains our system is able to achieve over compiler-generated, heavily-optimized executables. This research was supported by the National Science Foundation through grants ACR-9720738 and CCR-0113633.

[1]  B. Miller,et al.  Dynamic Kernel I-Cache Optimization , 1998 .

[2]  Robert S. Cohn,et al.  Optimizing Alpha Executables on Windows NT with Spike , 1998, Digit. Tech. J..

[3]  David W. Wall,et al.  A practical system fljr intermodule code optimization at link-time , 1993 .

[4]  J. E. Ball,et al.  Predicting the effects of optimization on a procedure body , 1979, SIGPLAN '79.

[5]  Doug Simon,et al.  Preliminary experience with the use of the UQBT binary translation framework , 1999, PACT 1999.

[6]  Cristina Cifuentes,et al.  Decompilation of binary programs , 1995, Softw. Pract. Exp..

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

[8]  P. Geoffrey Lowney,et al.  Alpha Executables on Windows NT with Spike , 1997 .

[9]  Thomas Ball,et al.  Edge profiling versus path profiling: the showdown , 1998, POPL '98.

[10]  James R. Larus,et al.  Efficient path profiling , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[11]  Saumya K. Debray,et al.  Alias analysis of executable code , 1998, POPL '98.

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

[13]  Gregory R. Andrews,et al.  PLTO: A Link-Time Optimizer for the Intel IA-32 Architecture , 2007 .

[14]  Cristina Cifuentes,et al.  Recovery of jump table case statements from binary code , 2001, Sci. Comput. Program..

[15]  John R. Levine Linkers and Loaders , 1999 .

[16]  James R. Larus,et al.  EEL: machine-independent executable editing , 1995, PLDI '95.

[17]  Saumya K. Debray,et al.  Goal-Directed Value Profiling , 2001, CC.

[18]  Saumya K. Debray,et al.  Code Specialization Based on Value Profiles , 2000, SAS.

[19]  Robert Muth,et al.  alto: a link‐time optimizer for the Compaq Alpha , 2001 .

[20]  Alec Wolman,et al.  Instrumentation and optimization of Win32/intel executables using Etch , 1997 .

[21]  Jack W. Davidson,et al.  Subprogram Inlining: A Study of its Effects on Program Execution Time , 1992, IEEE Trans. Software Eng..

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

[23]  Andrew Ayers,et al.  Aggressive inlining , 1997, PLDI '97.

[24]  David W. Goodwin,et al.  Interprocedural dataflow analysis in an executable optimizer , 1997, PLDI '97.

[25]  Henrik Theiling,et al.  Extracting safe and precise control flow from binaries , 2000, Proceedings Seventh International Conference on Real-Time Computing Systems and Applications.

[26]  Karl Pettis,et al.  Profile guided code positioning , 1990, PLDI '90.

[27]  Gregory R. Andrews,et al.  Disassembly of executable code revisited , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..