DJ-graphs and their application to flow graph analyses

In this paper we elaborate on the properties of DJ-graphs — a new program representation recently introduced for flowgraph analysis [SG94]. We present three applications of DJ-graphs for flowgraph analysis and the main contributions of this paper are as follows. We design a simple algorithm for computing multiple-node immediate dominators that has a better (polynomial-time) worst-case time complexity than the existing algorithm [Gup92]. We show howDJ-graphs can be used to reduce the search space when computingmultiple-node immediate dominators. We show how to identify loops, both reducible and irreducible, in a flowgraph using its DJ-graph by extending Tarjan’s approach. The advantage of our method is being able to identify the bodies of arbitrarily nested (reducible and irreducible) loops, with the only restriction that a sequence of consecutively nested irreducible loops will be identified as a single irreducible loop (region). We present a simple algorithm to compute dominance frontiers and the related sets using DJgraphs, which is linear both in space and time.