Sparse code motion

In this article, we add a third dimension to partial redundancy elimination by considering code size as a further optimization goal in addition to the more classical consideration of computation costs and register pressure. This results in a family of sparse code motion algorithms coming as modular extensions of the algorithms for busy and lazy code motion. Each of them optimally captures a predefined choice of priority between these three optimization goals, e.g. code size can be minimized while (1) guaranteeing at least the performance of the argument program, or (2) even computational optimality. Each of them can further be refined to simultaneously reduce the lifetimes of temporaries to a minimum. These algorithms are well-suited for size-critical application areas like smart cards and embedded systems, as they provide a handle to control the code replication problem of classical code motion techniques. In fact, we believe that our systematic, priority-based treatment of trade-offs between optimization goals may substantially decrease development costs of size-critical applications: users may “play” with the priorities until the algorithm automatically delivers a satisfactory solution.

[1]  Richard M. Karp,et al.  A n^5/2 Algorithm for Maximum Matchings in Bipartite Graphs , 1971, SWAT.

[2]  Etienne Morel,et al.  Global optimization by suppression of partial redundancies , 1979, CACM.

[3]  Brian L. Marks Compilation to Compact Code , 1980, IBM J. Res. Dev..

[4]  Alfred V. Aho,et al.  Data Structures and Algorithms , 1983 .

[5]  Christopher W. Fraser,et al.  Analyzing and compressing assembly code , 1984, SIGPLAN '84.

[6]  Alan Jay Smith,et al.  Branch Prediction Strategies and Branch Target Buffer Design , 1995, Computer.

[7]  David R. Ditzel,et al.  Design tradeoffs to support the C programming language in the CRISP microprocessor , 1987, ASPLOS.

[8]  Henry Massalin Superoptimizer: a look at the smallest program , 1987, ASPLOS 1987.

[9]  Manfred P. Stadel,et al.  A solution to a problem with Morel and Renvoise's “Global optimization by suppression of partial redundancies” , 1988, TOPL.

[10]  Dhananjay M. Dhamdhere A fast algorithm for code movement optimisation , 1988, SIGP.

[11]  Dhananjay M. Dhamdhere A new algorithm for composite hoisting and strength reduction optimisation , 1989 .

[12]  Arthur Sorkin,et al.  Some comments on “A solution to a problem with Morel and Renvoise's 'Global optimization by suppression of partial redundancies'” , 1989, ACM Trans. Program. Lang. Syst..

[13]  Dhananjay M. Dhamdhere Corrigendum: a new algorithm for composite hoisting and strength reduction optimisation , 1989 .

[14]  Dhananjay M. Dhamdhere Practical adaption of the global optimization algorithm of Morel and Renvoise , 1991, TOPL.

[15]  Bernhard Steffen,et al.  Lazy code motion , 1992, PLDI '92.

[16]  Wen-mei W. Hwu,et al.  Efficient Instruction Sequencing with Inline Target Insertion , 1992, IEEE Trans. Computers.

[17]  A. Wolfe,et al.  Executing Compressed Programs On An Embedded RISC Architecture , 1992, [1992] Proceedings the 25th Annual International Symposium on Microarchitecture MICRO 25.

[18]  Alvin M. Despain,et al.  Prophetic branches: a branch architecture for code compaction and efficient execution , 1993, MICRO 1993.

[19]  Manfred P. Stadel,et al.  A variation of Knoop, Rüthing, and Steffen's Lazy Code Motion , 1993, SIGP.

[20]  Bernhard Steffen,et al.  Optimal code motion: theory and practice , 1994, TOPL.

[21]  Keith D. Cooper,et al.  Effective partial redundancy elimination , 1994, PLDI '94.

[22]  Sharad Malik,et al.  Challenges in code generation for embedded processors , 1994, Code Generation for Embedded Processors.

[23]  Bernhard Steffen,et al.  Partial dead code elimination , 1994, PLDI '94.

[24]  M. Kozuch,et al.  Compression of embedded system programs , 1994, Proceedings 1994 IEEE International Conference on Computer Design: VLSI in Computers and Processors.

[25]  Kurt Keutzer,et al.  Code density optimization for embedded DSP processors using data compression techniques , 1995, Proceedings Sixteenth Conference on Advanced Research in VLSI.

[26]  Bernhard Steffen,et al.  The power of assignment motion , 1995, PLDI '95.

[27]  Kurt Keutzer,et al.  Storage assignment to decrease code size , 1996, TOPL.

[28]  Christopher W. Fraser,et al.  Code compression , 1997, PLDI '97.

[29]  Trevor N. Mudge,et al.  Improving code density using compression techniques , 1997, Proceedings of 30th Annual International Symposium on Microarchitecture.

[30]  O. Ruthing,et al.  Optimal code motion in the presence of large expressions , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[31]  Bernhard Steffen,et al.  Code Motion and Code Placement: Just Synonyms? , 1998, ESOP.

[32]  Oliver Rüthing,et al.  Bidirectional Data Flow Analysis in Code Motion: Myth and Reality , 1998, SAS.

[33]  Keith D. Cooper,et al.  Enhanced code compression for embedded RISC processors , 1999, PLDI '99.

[34]  Rajiv Gupta,et al.  Register Pressure Sensitive Redundancy Elimination , 1999, CC.

[35]  Keith D. Cooper,et al.  Optimizing for reduced code space using genetic algorithms , 1999, LCTES '99.

[36]  Jens Knoop Optimal Interprocedural Program Optimization: A New Framework and Its Application , 1999 .

[37]  William Pugh,et al.  Compressing Java class files , 1999, PLDI '99.

[38]  Amit Rao,et al.  Storage assignment optimizations to generate compact and efficient code on embedded DSPs , 1999, PLDI '99.

[39]  Oliver Rüthing Interacting Code Motion Transformations: Their Impact and Their Complexity , 2000, Lecture Notes in Computer Science.