Loading...
Please wait, while we are loading the content...
E cient Building and Placing of Gating Functions
| Content Provider | Semantic Scholar |
|---|---|
| Author | Tu, Peng |
| Copyright Year | 1995 |
| Abstract | The Gated Single-Assignment (GSA) program representation is an extension of the Static Single Assignment (SSA) representation[CFR91]. GSA was introduced by Ballance, Maccabe and Ottenstein as a part of Program Dependence Web (PDW)[BMO90]. It is a convenient representation for several program analysis and optimization techniques, including constant propagation with conditional branches[WZ91]; equality of symbolic expressions[AWZ88, Hav93]; induction variable substitution[Wol92]; symbolic dependence analysis [BE94] and demand-driven symbolic analysis for array privatization[TP94, TP93]. In the SSA representation, functions of a single type are placed at the con uence nodes of a program ow graph to represent di erent de nitions of a variable reaching from di erent incoming edges. The condition under which a de nition reachs a con uence node is not represented in the function. By contrast, in the GSA representation, several types of gating functions are de ned to represent the di erent condition classes at di erent con uence nodes. Some extra parameters are introduced in the gating functions to represent the conditions. In this paper, we present an almost linear time algorithm to construct the GSA. The new algorithm is more e cient and simpler than the existing algorithms for GSA construction [BMO90, Hav93]. Since SSA is a special case of GSA, it can also be used as an e cient alternative algorithm for SSA construction. The existing algorithms for building the GSA follow two steps. The rst step is the same function placement procedure as in the SSA construction[CFR91]. In the second step, the GSA conversion algorithms collect the control dependences of the de nitions reaching a function and transforms the function into a gating function. The original GSA conversion algorithm[BMO90] assumed a Program Dependence Graph (PDG)[FOW87] as its initial representation. Havlak developed another algorithm[Hav93] to construct a variant of the GSA, known as Thinned GSA. Because it starts with the program ow graph, it is, therefore, somewhat simpler. For each function, both algorithms traverse the control ow graph to nd the gating conditions for each reaching de nition. To convert a function to a gating function, O(E) edges may be visited (where E is the number of edges in the ow graph). Since the number of functions in the program is O(N ) (where N is the number of nodes in the program), and the same edge may be visited for every function, the time complexity of these algorithms is O(E N ). The algorithm in this paper constructs and places the gating functions from a program control ow graph in a single step. In our algorithm, SSA and GSA constructions are uni ed under a single process of gating path construction. It uses the path compression technique[Tar79] to reduce the total number of visits to the edges in the ow graph. Tarjan describes two ways to implement the path compression. A simple method has an O(E log(N )) time bound; a sophisticated o -line algorithm maintaining balanced subtrees has an O(E (E;N )) time bound. Yet another on-line O(E (E;N )) |
| File Format | PDF HTM / HTML |
| Alternate Webpage(s) | http://polaris.cs.uiuc.edu/publications/1389.pdf |
| Language | English |
| Access Restriction | Open |
| Content Type | Text |
| Resource Type | Article |