Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
All structured programs have small tree width and good register allocation
Information and Computation
Register allocation in structured programs
Proceedings of the sixth annual ACM-SIAM symposium on Discrete algorithms
Linear-time register allocation for a fixed number of registers
Proceedings of the ninth annual ACM-SIAM symposium on Discrete algorithms
Letters to the editor: go to statement considered harmful
Communications of the ACM
Generalized Dominators for Structured Programs
SAS '96 Proceedings of the Third International Symposium on Static Analysis
Iterative-free program analysis
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
Tree-decompositions of small pathwidth
Discrete Applied Mathematics - Structural decompositions, width parameters, and graph labelings (DAS 5)
Space-efficient construction variants of dynamic programming
Nordic Journal of Computing
An empirical study of Java bytecode programs
Software—Practice & Experience
Bounded treewidth as a key to tractability of knowledge representation and reasoning
Artificial Intelligence
Tree-decompositions of small pathwidth
Discrete Applied Mathematics - Structural decompositions, width parameters, and graph labelings (DAS 5)
Monadic datalog over finite structures of bounded treewidth
ACM Transactions on Computational Logic (TOCL)
SOFSEM'05 Proceedings of the 31st international conference on Theory and Practice of Computer Science
Fixed-Parameter tractability of treewidth and pathwidth
The Multivariate Algorithmic Revolution and Beyond
Optimal register allocation in polynomial time
CC'13 Proceedings of the 22nd international conference on Compiler Construction
Optimal placement of bank selection instructions in polynomial time
Proceedings of the 16th International Workshop on Software and Compilers for Embedded Systems
Proceedings of the 2nd ACM SIGPLAN workshop on Functional high-performance computing
The complexity of register allocation
Discrete Applied Mathematics
Hi-index | 0.00 |
Intuitively, the treewidth of a graph G measures how close G is to being a tree. The lower the treewidth, the faster we can solve various optimization problems on G, by dynamic programming along the tree structure. In the paper M.Thorup, All Structured Programs have Small Tree-Width and Good Register Allocation [8] it is shown that the control-flow graph of any goto-free C program is at most 6. This result opened for the possibility of applying the dynamic programming bounded treewidth algorithms to various compiler optimization tasks. In this paper we explore this possibility, in particular for Java programs. We first show that even if Java does not have a goto, the labelled break and continue statements are in a sense equally bad, and can be used to construct Java programs that are arbitrarily hard to understand and optimize.For Java programs lacking these labelled constructs Thorup's result for C still holds, and in the second part of the paper we analyze the treewidth of label-free Java programs empirically. We do this by means of a parser that computes a tree-decomposition of the control-flow graph of a given Java program. We report on experiments running the parser on several of the Java API packages, and the results tell us that on average the treewidth of the control-flow graph of these Java programs is no more than 2.7. This is the first empirical test of Thorup's result, and it confirms our suspicion that the upper bounds of treewidth 6, 5 and 4 are rarely met in practice, boding well for the application of treewidth to compiler optimization.