Abstract

A crucial problem in parallelizing compiler design is the choice of a suitable Intermediate Representation (IR) to make parallelism detection and extraction easy and possible. Dependence graphs have long been recognized as useful tools for this aim. Several versions were proposed [1,4,6,20], which encapsulate relations of data dependence, control dependence or both. They were also used in conventional optimizations, but always coupled with the traditional Control Flow Graph (CFG). However, it would be preferable to apply both conventional and parallelizing optimizations to the same IR. Recently, some attempts were made to use dependence graphs as a unifying framework on which all types of optimization [4] are applied. This is one of the aims of our work in this research area. We started working on the well known Hierarchical Task Graph (HTG) of Polychronopoulos and Girkar [6,7,8]. The HTG, by definition, is an acyclic and then a reducible graph. In fact it is built from a CFG arranged hierarchically around loops with all loop back edges removed. This CFG is then enriched with control and data dependence information (edges). Our proposal is an extension of the HTG, named Extended Hierarchical Task Graph (EHTG), that is a HTG where data dependence edges are annotated with a boolean branch path expression indicating the CFG paths through which the data dependences are established. We developed two algorithms of constant propagation (used for dead code elimination) running directly on our EHTG without using the traditional CFG. The two algorithms can be applied only to sequential programs whose parallelism is represented by the HTG structure. They are not suited to perform constant propagation on explicitly parallel programs [12]. Complexity and correctness of the algorithms are analyzed and we also prove that one of them has the same complexity and finds the same class of constants as the well known Wegman & Zadeck constant propagation algorithm [20], that uses a hybrid sparse representation.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call