Abstract. Since decades, basic-block (BB) graphs have been the stateof-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.
MotivationIn program analysis and optimization it is common to work on so-called flow graphs, whose edge structure makes the control flow of the underlying program explicit. Most widely used are node-labeled basic-block (BB) graphs, whose nodes represent maximal sequences of straight-line code. This most prominent representation can be modified according to (1) its granularity in order to arrive at single-instruction (SI) graphs and/or to (2) its way of instruction modelling: edge-labeled graphs model instructions/basic blocks by edges rather than nodes.In this article we investigate these four variants of program representation both from a theoretical and practical point of view. It turns out that the most prominent representation in practice is no longer adequate in times where already the main storage of home computers easily accommodates SI-graphs for huge procedures. Moreover, we show that edge-labeled graphs simplify both the theoretical reasoning about analysis and optimization as well as their implementation in comparison to their node-labeled counterparts.