Speculative alias analysis for executable code

Optimizations performed at link time or directly applied to final program executables have received increased attention in recent years. Such low-level optimizations can benefit greatly from pointer alias information. However as almost all existing alias analyses are formulated in terms of source language constructs, they turn out to be of limited utility at the machine code level. This paper describes two different approaches to high-quality, low-cost, speculative may-alias analysis, to be applied in the context of link-time or executable code optimizers. The key idea behind our proposals is the introduction of unsafe speculations at analysis-time, which increases alias precision on important portions of code, and keeps the analysis reasonably cost-efficient. Experimental results indicate that introducing speculation at analysis-time is clearly beneficial: precision increases up to 83% in average, against a baseline precision of 16%. Furthermore, the percentage of dynamic misspeculations is typically about 2%, which shows that our technique can be used even for scenarios where speculation recovery is expensive.

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

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

[3]  Weihaw Chuang,et al.  The Intel IA-64 Compiler Code Generator , 2000, IEEE Micro.

[4]  Monica S. Lam,et al.  Efficient context-sensitive pointer analysis for C programs , 1995, PLDI '95.

[5]  Wolfram Amme,et al.  Data dependence analysis of assembly code , 1998, Proceedings. 1998 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.98EX192).

[6]  Rastislav Bodík,et al.  Path-sensitive value-flow analysis , 1998, POPL '98.

[7]  Trevor N. Mudge,et al.  The store-load address table and speculative register promotion , 2000, MICRO 33.

[8]  Dynamic Kernel Code Optimization , 1998 .

[9]  John Paul Shen,et al.  Speculative disambiguation: a compilation technique for dynamic memory disambiguation , 1994, Proceedings of 21 International Symposium on Computer Architecture.

[10]  Susan Horwitz,et al.  Fast and accurate flow-insensitive points-to analysis , 1997, POPL '97.

[11]  Scott A. Mahlke,et al.  Profile‐guided automatic inline expansion for C programs , 1992, Softw. Pract. Exp..

[12]  Todd M. Austin,et al.  The SimpleScalar tool set, version 2.0 , 1997, CARN.

[13]  Rajiv Gupta,et al.  Path profile guided partial redundancy elimination using speculation , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[14]  David C. Sehr,et al.  On the importance of points-to analysis and other memory disambiguation methods for C programs , 2001, PLDI '01.

[15]  Barbara G. Ryder,et al.  Data-flow analysis of program fragments , 1999, ESEC/FSE-7.

[16]  Koen De Bosschere,et al.  alto: a link-time optimizer for the Compaq Alpha , 2001, Softw. Pract. Exp..

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

[18]  Amer Diwan,et al.  Type-based alias analysis , 1998, PLDI.

[19]  James R. Larus,et al.  Improving data-flow analysis with path profiles , 1998, PLDI.

[20]  Jack W. Davidson,et al.  Profile guided code positioning , 1990, SIGP.

[21]  Norman Rubin,et al.  Spike: an optimizer for alpha/NT executables , 1997 .

[22]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[23]  Wen-mei W. Hwu,et al.  Modular interprocedural pointer analysis using access paths: design, implementation, and evaluation , 2000, PLDI '00.

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

[25]  Rajiv Gupta,et al.  A practical framework for demand-driven interprocedural data flow analysis , 1997, TOPL.

[26]  Scott A. Mahlke,et al.  Dynamic memory disambiguation using the memory conflict buffer , 1994, ASPLOS VI.

[27]  Robert S. Cohn,et al.  Hot cold optimization of large Windows/NT applications , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[28]  Saumya K. Debray,et al.  Alto: a platform for object code modification , 1999 .