In optimizing compilers, data structure choices directly influence the power and efficiency of practical program optimization. A poor choice of data structure can inhibit optimization or slow compilation to the point that advanced optimization features become undesirable. Recently, static single assignment form and the control dependence graph have been proposed to represent data flow and control flow properties of programs. Each of these previously unrelated techniques lends efficiency and power to a useful class of program optimizations. Although both of these structures are attractive, the difficulty of their construction and their potential size have discouraged their use. We present new algorithms that efficiently compute these data structures for arbitrary control flow graphs. The algorithms use {\em dominance frontiers}, a new concept that may have other applications. We also give analytical and experimental evidence that all of these data structures are usually linear in the size of the original program. This paper thus presents strong evidence that these structures can be of practical use in optimization.
Cited By
- Fischer T, Hirn D and Grust T Snakes on a Plan: Compiling Python Functions into Plain SQL Queries Proceedings of the 2022 International Conference on Management of Data, (2389-2392)
- Tosch E, Bakshy E, Berger E, Jensen D and Moss J (2021). PlanAlyzer, Communications of the ACM, 64:9, (108-116), Online publication date: 1-Sep-2021.
- Hirn D and Grust T One WITH RECURSIVE is Worth Many GOTOs Proceedings of the 2021 International Conference on Management of Data, (723-735)
- Hirn D and Grust T PL/SQL Without the PL Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, (2677-2680)
- Bahmann H, Reissmann N, Jahre M and Meyer J (2015). Perfect Reconstructability of Control Flow from Demand Dependence Graphs, ACM Transactions on Architecture and Code Optimization, 11:4, (1-25), Online publication date: 9-Jan-2015.
- Yang X, Zhang Y, Xue J, Rogers I, Li G and Wang G Exploiting loop-dependent stream reuse for stream processors Proceedings of the 17th international conference on Parallel architectures and compilation techniques, (22-31)
- Chase D, Wegman M and Zadeck F (2004). Analysis of pointers and structures, ACM SIGPLAN Notices, 39:4, (343-359), Online publication date: 1-Apr-2004.
- Chase D, Wegman M and Zadeck F (1990). Analysis of pointers and structures, ACM SIGPLAN Notices, 25:6, (296-310), Online publication date: 1-Jun-1990.
- Chase D, Wegman M and Zadeck F Analysis of pointers and structures Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation, (296-310)
Recommendations
Using static single assignment form in a code optimizer
Static single assignment form represents data dependences elegantly and provides a basis for powerful optimizations. Table-driven techniques for peephole optimization and code generation are straightforward and effective. it is natural to want to use ...
Static Single Assignment Form for Message-Passing Programs
This paper presents a novel scheme for maintaining accurate information about distributed data in message-passing programs. We describe static single assignment (SSA) based algorithms to build up an intermediate representation of a sequential program ...