editing disabled
vivdesh
guest · Join · Help · Sign In · Wikispaces

Protected
Dependency Analysis
It is a task of determining whether the statements within a loop body form data dependence with respect to array references. It consists of subscript analysis then followed by different tests to determine the dependencies within the statements.
Subscript Analysis
/*The array references in pseudo language are single dimensional also pseudo language does not perform aliasing.*/
In our program, the subscripts for array references are analyzed and classified as Zero Index Variable (ZIV), Single Index Variable (SIV). In SIV those are further classified as strong SIV <ai+c1, ai+c2>, weak zero SIV <ai+c1, c2>, weak crossing SIV <ai+c1,-ai+c2> and further as of general SIV <a1i+c1, a2i+c2>.
Currently the indices are not classified for the Multiple Index Variable (MIV) category.
Also, since pseudo language has single dimensional arrays, there is no need of analysis of coupling.
Single subscript Tests
For each subscript single subscript tests are applied such as ZIV, SIV and variants of SIV tests.
The dependencies within statements are identified such as loop carried or loop independent dependencies. Also the distance and direction within subscripts of the array reference is obtained.
The dependency graph is generated with statements in the loop as vertices and dependencies as edges. The properties of edge are - Loop carried (with level) or loop independent along with direction and distance vectors

Vector code generation
This phase operates on the loop data structures and the dependence graph generated in previous pass. It analyses the dependences within the statements in the loops by applying the 'codegen' algorithm discussed in class.
These are the steps performed:
- Find strongly connected components and sort them in topological order
- Analyze each SCC, if its cyclic emit out the k-level FOR loop.
and remove k-level dependencies and analyze further.
- If statement is not cyclic generate vector statement.

Home
Loading...
Home Turn Off "Getting Started"
Loading...