Basic-Block Graphs: Living Dinosaurs?

Since decades, basic-block (BB) graphs have been the state- of-the-art means for representing programs in advanced industrial compiler environments. The usual justification for introducing the intermediate BB-structures in the program representation is performance: analyses on BB-graphs are generally assumed to outperform their counterparts on single-instruction (SI) graphs, which, undoubtedly, are conceptually much simpler, easier to implement, and more straightforward to verify. In this article, we discuss the difference between the two program representations and show by means of runtime measurements that, according to the new computer generations, performance is no longer on the side of the more complex BB-graphs. In fact, it turns out that no sensible reason for the BB-structure remains. Rather, we will demonstrate that edge-labeled SI-graphs, which model statements in their edges instead of in their nodes as classical flow graphs do, are most adequate, both for the theoretical reasoning about and for the implementation of analysis and optimization algorithms. We are convinced that this perception has far-reaching consequences for the design of compiler systems.

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

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

[3]  David B. Whalley,et al.  Avoiding conditional branches by code replication , 1995, PLDI '95.

[4]  Manfred Reitenspie,et al.  Service Creation: Formal Veriication and Abstract Views , 1996 .

[5]  M. Wegman,et al.  Global value numbers and redundant computations , 1988, POPL '88.

[6]  Dhananjay M. Dhamdhere,et al.  Characterization of Program Loops in Code Optimization , 1983, Comput. Lang..

[7]  Jeffrey D. Ullman,et al.  Application of lattice algebra to loop optimization , 1975, POPL '75.

[8]  Tiziana Margaria,et al.  An Environment for the Creation of Intelligent Network Services , 1995 .

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

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

[11]  Ken Kennedy,et al.  An algorithm for reduction of operator strength , 1977, Commun. ACM.

[12]  Cliff Click,et al.  Global code motion/global value numbering , 1995, PLDI '95.

[13]  Bernhard Steffen,et al.  The Value Flow Graph: A Program Representation for Optimal Program Transformations , 1990, ESOP.

[14]  Bernhard Steffen,et al.  DFA&OPT-METAFrame: A Tool Kit for Program Analysis and Optimazation , 1996, TACAS.

[15]  Robert Giegerich,et al.  Invariance of Approximate Semantics with Respect to Program Transformations , 1981, GI Jahrestagung.

[16]  Gary A. Kildall,et al.  A unified approach to global program optimization , 1973, POPL.

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

[18]  Matthew S. Hecht,et al.  Flow Analysis of Computer Programs , 1977 .

[19]  Keith D. Cooper,et al.  Combining analyses, combining optimizations , 1995, TOPL.

[20]  Michael Wolfe,et al.  Beyond induction variables , 1992, PLDI '92.

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

[22]  Dhananjay M. Dhamdhere,et al.  How to analyze large programs efficiently and informatively , 1992, PLDI '92.

[23]  Bernhard Steffen,et al.  Parallelism for Free: Bitvector Analyses -> No State Explosion! , 1995, TACAS.

[24]  Gary Arlen Kildall,et al.  Global expression optimization during compilation , 1972 .

[25]  Dhananjay M. Dhamdhere,et al.  Strength reduction of large expressions , 1995, J. Program. Lang..

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

[27]  Steven W. K. Tjiang,et al.  Sharlit—a tool for building optimizers , 1992, PLDI '92.